Fixed coverity issues
[platform/core/connectivity/net-config.git] / src / wifi-config.c
index a53f705..a81285f 100755 (executable)
@@ -165,6 +165,7 @@ static gboolean __get_group_name(const gchar *prefix, const gchar *config_id, gc
        ret = __get_mac_address(&mac_address);
        if ((ret != TRUE) || (strlen(mac_address) == 0)) {
                ERR("Cannot get WIFI MAC address");
+               g_free(mac_address);
                return FALSE;
        }
 
@@ -692,6 +693,7 @@ static int __netconfig_unpack_ay_malloc(unsigned char **dst, GVariantIter *iter)
        tmp_dst = (unsigned char *)g_try_malloc0(length + 1);
        if (!tmp_dst) {
                ERR("failed to allocate memory");
+               g_variant_iter_free(iter_copy);
                return 0;
        }