Private
Public Access
2
0

intel_minnow_byt_compatible: fix memory leak

mraa_adv_func_t was allocated twice for the adv_func field

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Matthew Auld
2015-09-18 11:08:50 +01:00
committed by Brendan Le Foll
parent 1a29dc9910
commit 434f454139

View File

@@ -98,7 +98,6 @@ mraa_intel_minnowboard_byt_compatible()
b->platform_name = PLATFORM_NAME;
b->phy_pin_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
b->gpio_count = MRAA_INTEL_MINNOW_MAX_PINCOUNT;
b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t));
b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * MRAA_INTEL_MINNOW_MAX_PINCOUNT);
if (b->pins == NULL) {