From: Priya Kohli Date: Tue, 12 Nov 2024 10:38:28 +0000 (+0530) Subject: [location-manager] Memory Leak fix X-Git-Tag: accepted/tizen/9.0/unified/20250410.163717^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_9.0_unified;p=platform%2Fcore%2Fapi%2Flocation-manager.git [location-manager] Memory Leak fix Change-Id: I810cd07dfb1aa0b8892a1247c7c9d9769e08e56e Signed-off-by: Priya Kohli --- diff --git a/src/locations.c b/src/locations.c index 62cae97..138aec9 100755 --- a/src/locations.c +++ b/src/locations.c @@ -826,6 +826,9 @@ EXPORT_API int location_manager_get_location(location_manager_h manager, double return __convert_error_code(ret); //LCOV_EXCL_LINE if (pos->status == LOCATION_STATUS_NO_FIX) { + location_position_free(pos); + location_velocity_free(vel); + location_accuracy_free(acc); return __convert_error_code(LOCATION_ERROR_NOT_AVAILABLE); //LCOV_EXCL_LINE } else { *latitude = pos->latitude;