diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:08:01 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2016-02-06 16:08:01 +0100 |
commit | ec202b96d9f5012c244d697fe8cd418e0d527248 (patch) | |
tree | 410fb91c18bf6a386f08a880e8c6e4d401b3aac0 | |
parent | 5b6f7877ee8d0126cf6bef5078977d5d5ba09919 (diff) | |
download | libgphoto2-ec202b96d9f5012c244d697fe8cd418e0d527248.tar.gz |
ricoh: fix widget leaks on error (Coverity)
296074 Resource leak
-rw-r--r-- | camlibs/ricoh/library.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/camlibs/ricoh/library.c b/camlibs/ricoh/library.c index fea97ed93..46c6fd593 100644 --- a/camlibs/ricoh/library.c +++ b/camlibs/ricoh/library.c @@ -432,13 +432,13 @@ camera_get_config (Camera *c, CameraWidget **window, GPContext *co) /* General settings */ CR (gp_widget_new (GP_WIDGET_SECTION, _("General"), &s)); - CR (gp_widget_append (*window, s)); + CRW (gp_widget_append (*window, s), s); /* Copyright */ CR (gp_widget_new (GP_WIDGET_TEXT, _("Copyright"), &w)); - CR (gp_widget_set_name (w, "copyright")); - CR (gp_widget_set_info (w, _("Copyright (max. 20 characters)"))); - CR (gp_widget_append (s, w)); + CRW (gp_widget_set_name (w, "copyright"), w); + CRW (gp_widget_set_info (w, _("Copyright (max. 20 characters)")), w); + CRW (gp_widget_append (s, w), w); CR (ricoh_get_copyright (c, co, ©right)); CR (gp_widget_set_value (w, (void *) copyright)); |