diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2007-05-11 16:26:01 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2007-05-11 16:26:01 +0000 |
commit | 10755302f8af97ca0f630f299ff4e0071c533599 (patch) | |
tree | 374616c8d9df50681e70955d9188f618e2f090e4 /camlibs/ricoh | |
parent | 6c8a3e90a6416f6feab7de964bc16ab043f875a9 (diff) | |
download | libgphoto2-10755302f8af97ca0f630f299ff4e0071c533599.tar.gz |
added some missing gp_widget_free() in error exit paths (CID 75) (CID 74)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10172 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/ricoh')
-rw-r--r-- | camlibs/ricoh/library.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/camlibs/ricoh/library.c b/camlibs/ricoh/library.c index ab4d6a530..39a27c6d5 100644 --- a/camlibs/ricoh/library.c +++ b/camlibs/ricoh/library.c @@ -51,6 +51,7 @@ #endif #define CR(result) {int r=(result); if (r<0) return r;} +#define CRW(result,widget) {int r=(result); if (r<0) { gp_widget_free (widget); return r; } } static struct { RicohModel id; @@ -444,15 +445,15 @@ camera_get_config (Camera *c, CameraWidget **window, GPContext *co) /* Date */ CR (gp_widget_new (GP_WIDGET_DATE, _("Date & Time"), &w)); - CR (gp_widget_set_name (w, "date")); - CR (gp_widget_set_info (w, _("Date & Time"))); - CR (gp_widget_append (s, w)); + CRW (gp_widget_set_name (w, "date"), w); + CRW (gp_widget_set_info (w, _("Date & Time")), w); + CRW (gp_widget_append (s, w), w); CR (ricoh_get_date (c, co, &time)); CR (gp_widget_set_value (w, &time)); /* Picture related settings */ CR (gp_widget_new (GP_WIDGET_SECTION, _("Pictures"), &s)); - CR (gp_widget_append (*window, s)); + CRW (gp_widget_append (*window, s), w); R_ADD_RADIO (c, co, s, RicohResolution, resolution, "Resolution") R_ADD_RADIO (c, co, s, RicohExposure, exposure, "Exposure") |