From: Yunhee Seo Date: Wed, 24 Apr 2024 07:49:40 +0000 (+0900) Subject: Remove free data section when the module exits X-Git-Tag: accepted/tizen/unified/20240614.085013^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea3a29b926ffb4fc47d156935301b2999fb3951d;p=platform%2Fhal%2Fbackend%2Femulator%2Fdevice-emulator.git Remove free data section when the module exits In the hal backend module, when the moudle exits, the hal_backend_[module]_funcs was handled from [module]_exit function. The data parameter is handed over from hal-api-common put_backend function. And data is pointing to hal_backend_[module]_funcs, and free by hal-backend module. As memory release operation moves to the hal-api-device side, also double free operation is useless, thus it is deleted from hal-backend. Change-Id: Ic11290b3643205d41f4d07807b04ad66748882b1 Signed-off-by: Yunhee Seo --- diff --git a/hw/battery/battery.c b/hw/battery/battery.c index 2e8de13..5d21d94 100644 --- a/hw/battery/battery.c +++ b/hw/battery/battery.c @@ -287,10 +287,6 @@ static int battery_init(void **data) static int battery_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/display/display.c b/hw/display/display.c index 05f4a5f..d010f60 100644 --- a/hw/display/display.c +++ b/hw/display/display.c @@ -116,10 +116,6 @@ static int display_init(void **data) static int display_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/external_connection/external_connection.c b/hw/external_connection/external_connection.c index e8eb69c..09bfd11 100644 --- a/hw/external_connection/external_connection.c +++ b/hw/external_connection/external_connection.c @@ -196,10 +196,6 @@ static int external_connection_init(void **data) static int external_connection_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/haptic/emulator.c b/hw/haptic/emulator.c index 127305d..48da525 100644 --- a/hw/haptic/emulator.c +++ b/hw/haptic/emulator.c @@ -152,10 +152,6 @@ static int haptic_init(void **data) static int haptic_exit(void *data) { - if (!data) - return -EINVAL; - - free(data); return 0; } diff --git a/hw/memory/memory.c b/hw/memory/memory.c index 21bde9d..66ed8a7 100644 --- a/hw/memory/memory.c +++ b/hw/memory/memory.c @@ -54,7 +54,6 @@ static int memory_init(void **data) static int memory_exit(void *data) { - free(data); return 0; }