From db600b0055182972dbe2b353298f0d02e996cd50 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Mon, 6 Feb 2012 16:04:31 +0100 Subject: [PATCH] ndef: Support unknown MIME types Unknown MIME types are left without parsing. --- src/ndef.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ndef.c b/src/ndef.c index 16cfb52..f0b6831 100644 --- a/src/ndef.c +++ b/src/ndef.c @@ -464,6 +464,9 @@ static void free_sp_record(struct near_ndef_sp_record *sp) static void free_mime_record(struct near_ndef_mime_record *mime) { + if (mime == NULL) + return; + g_free(mime->type); g_free(mime); @@ -1181,8 +1184,6 @@ parse_mime_type(struct near_ndef_record *record, } else if (strcmp(mime->type, "nokia.com:bt") == 0) { err = __near_bt_parse_oob_record(BT_MIME_V2_0, &ndef_data[offset]); - } else { - err = -EOPNOTSUPP; } if (err < 0) { -- 2.7.4