]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_geoloc: fix NULL pointer dereference bug
authorAlexandre Fournier <afournier@wazo.io>
Fri, 9 Dec 2022 19:37:13 +0000 (14:37 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 13 Dec 2022 15:32:10 +0000 (10:32 -0500)
commitc900a7dc398f6ba28e3c7e8e40222c63566acdc7
tree26502bc5212003f2b7da067b438778bda6f920f4
parent1c8f57e29814659645f5db7ecaa4a6e0d50f41bc
res_geoloc: fix NULL pointer dereference bug

The `ast_geoloc_datastore_add_eprofile` function does not return 0 on
success, it returns the size of the underlying datastore. This means
that the datastore will be freed and its pointer set to NULL when no
error occured at all.

ASTERISK-30346

Change-Id: Iea9b209bd1244cc57b903b9496cb680c356e4bb9
res/res_geolocation/geoloc_datastore.c