Remove free data section when the module exits 32/310232/2 accepted/tizen/unified/20240614.085013 accepted/tizen/unified/dev/20240620.010511
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 07:49:40 +0000 (16:49 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 08:12:16 +0000 (17:12 +0900)
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 <yuni.seo@samsung.com>
hw/battery/battery.c
hw/display/display.c
hw/external_connection/external_connection.c
hw/haptic/emulator.c
hw/memory/memory.c

index 2e8de13feafc8328df198468807d53bb75d0ec37..5d21d940a72208595a77f374a165f9a83533f0fb 100644 (file)
@@ -287,10 +287,6 @@ static int battery_init(void **data)
 
 static int battery_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index 05f4a5f23d07b67f6a6c2853eda71c64480c71f6..d010f6078215fc081fbd1e543921adfc35e1805f 100644 (file)
@@ -116,10 +116,6 @@ static int display_init(void **data)
 
 static int display_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index e8eb69c9606a271083ca0f0168839b820b15f71d..09bfd1128c1c5d69d972a546dade98278ea3a84e 100644 (file)
@@ -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;
 }
 
index 127305d485397778b22c4b83c878acfe96a57614..48da52519dd6383f04d765d805791cfd105b60d0 100644 (file)
@@ -152,10 +152,6 @@ static int haptic_init(void **data)
 
 static int haptic_exit(void *data)
 {
-    if (!data)
-        return -EINVAL;
-
-    free(data);
     return 0;
 }
 
index 21bde9dac05f447057d7b2dc2134daececb1018a..66ed8a7f09cc1676c279d77fe42d3dc0f2544a41 100644 (file)
@@ -54,7 +54,6 @@ static int memory_init(void **data)
 
 static int memory_exit(void *data)
 {
-       free(data);
        return 0;
 }