Commit df2711f1 authored by Thomas Haller's avatar Thomas Haller
Browse files

nmtst: fix memory leak in nmtst_create_minimal_connection()


Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
parent 964b9f35
......@@ -33,6 +33,7 @@
#include "nm-utils.h"
#include "nm-glib-compat.h"
#include "gsystem-local-alloc.h"
struct __nmtst_internal
......@@ -687,13 +688,14 @@ nmtst_create_minimal_connection (const char *id, const char *uuid, const char *t
NMConnection *con;
NMSetting *s_base = NULL;
NMSettingConnection *s_con;
gs_free char *uuid_free = NULL;
g_assert (id);
if (uuid)
g_assert (nm_utils_is_uuid (uuid));
else
uuid = nm_utils_uuid_generate ();
uuid = uuid_free = nm_utils_uuid_generate ();
if (type) {
GType type_g = nm_connection_lookup_setting_type (type);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment