]> 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)
committerJoshua Colp <jcolp@sangoma.com>
Tue, 13 Dec 2022 16:55:32 +0000 (10:55 -0600)
commitaf7af641d6d7e52f036b2a95d99a922ed7077890
treec42df8f55af833a5661977f075b2a1bede48d19d
parent07f99b31d0a7688ea6b3674f4212020c9ab3bfc8
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