netutils/libcoap : bug fix, memory leakage on coap_delete_attr
authorJin-Seong Kim <jseong82.kim@samsung.com>
Wed, 31 May 2017 04:00:24 +0000 (13:00 +0900)
committerEunBong Song <eunb.song@samsung.com>
Tue, 11 Jul 2017 01:26:57 +0000 (10:26 +0900)
This commit is patch to fix memory leakage on coap_delete_attr
 - CFLAG should be WITH_POSIX not POSIX to free attr

Change-Id: I5d4280bc25df7893108ce6c54ae0518ec0fe4b4b
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
apps/netutils/libcoap/resource.c

index 5935c59..c1f20b5 100644 (file)
@@ -410,7 +410,7 @@ void coap_delete_attr(coap_attr_t *attr)
        if (attr->flags & COAP_ATTR_FLAGS_RELEASE_VALUE) {
                coap_free(attr->value.s);
        }
-#ifdef POSIX
+#ifdef WITH_POSIX
        coap_free(attr);
 #endif
 #ifdef WITH_LWIP