From: Anchit Narang Date: Mon, 22 Jun 2015 09:03:15 +0000 (+0530) Subject: Fixed Memory Leak in function __bt_convert_string_to_uuid X-Git-Tag: submit/tizen_mobile/20150721.054200~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91a1d91428a38818de20b6372cfef037b26c4ab0;p=platform%2Fcore%2Fapi%2Fbluetooth.git Fixed Memory Leak in function __bt_convert_string_to_uuid Change-Id: Iaccc0fc95e3f70f422a41b64891d0eb2a72908e3 --- diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index 36ec2f9..daf82c3 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -1401,8 +1401,10 @@ static int __bt_convert_string_to_uuid(const char *string, char **uuid, int *bit ret = sscanf(string, "%08x-%04hx-%04hx-%04hx-%08x%04hx", &val0, &val1, &val2, &val3, &val4, &val5); - if (ret != 6) + if (ret != 6) { + g_free(data); return BT_ERROR_OPERATION_FAILED; + } val0 = htonl(val0); val1 = htons(val1);