OSDN Git Service

health: Fix memory leak
authorSyam Sidhardhan <s.syam@samsung.com>
Thu, 12 Apr 2012 15:02:52 +0000 (20:32 +0530)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 13 Apr 2012 09:35:51 +0000 (12:35 +0300)
health/mcap.c

index 4c726b6..b76d88a 100644 (file)
@@ -901,6 +901,7 @@ static gboolean parse_set_opts(struct mcap_mdl_cb *mdl_cb, GError **err,
                default:
                        g_set_error(err, MCAP_ERROR, MCAP_ERROR_INVALID_ARGS,
                                                "Unknown option %d", cb);
+                       g_free(c);
                        return FALSE;
                }
                cb = va_arg(args, int);