free setprops in error case (Coverity)

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14655 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-01-06 12:00:20 +00:00
parent 742aeabefd
commit 331dadd297

View File

@@ -6106,8 +6106,10 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
}
if (!params->deviceinfo.DevicePropertiesSupported_len)
if (!params->deviceinfo.DevicePropertiesSupported_len) {
free (setprops);
return GP_OK;
}
/* Last menu is "Other", a generic property fallback window. */
gp_widget_new (GP_WIDGET_SECTION, _("Other PTP Device Properties"), &section);