ndef: Fix memory leak
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 21 Nov 2011 14:59:50 +0000 (15:59 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 21 Nov 2011 16:52:02 +0000 (17:52 +0100)
The type array as leaking.

src/ndef.c

index 63d07fc..7c50494 100644 (file)
@@ -1050,6 +1050,7 @@ int near_ndef_parse(struct near_tag *tag,
 
                r_type = get_record_type(t_tnf, type, type_length);
                offset += (type_length + il_length);
+               g_free(type);
 
                record = g_try_malloc0(sizeof(struct near_ndef_record));
                if (record == NULL) {