Fix memory leak
[platform/core/connectivity/wifi-direct-manager.git] / plugin / wpasupplicant / ctrl_iface_dbus / wfd-plugin-wpasupplicant.c
index 9d7a193..d21a0f6 100644 (file)
@@ -522,6 +522,7 @@ static int __ws_unpack_ay_malloc(unsigned char **dst, GVariantIter *iter)
        tmp_dst = (unsigned char *)g_try_malloc0(length + 1);
        if (!tmp_dst) {
                WDP_LOGE("failed to allocate memory");
+               g_variant_iter_free(iter_copy);
                return 0;
        }