[PATCH] openbsc[master]: libmsc/update_db_revision_3(): free memleaking db result

lynxis lazus gerrit-no-reply at lists.osmocom.org
Sat Feb 4 00:52:49 UTC 2017

Review at  https://gerrit.osmocom.org/1750

libmsc/update_db_revision_3(): free memleaking db result

Found by ASAN

Change-Id: I2680c60e26b9876b428d4b75323f884f9ecd95b3
M openbsc/src/libmsc/db.c
1 file changed, 2 insertions(+), 0 deletions(-)

  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/1750/1

diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 68dac76..9fa6415 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -346,6 +346,8 @@
 			"Failed to commit the transaction (upgrade from rev 3)\n");
 		return -EINVAL;
+	} else {
+		dbi_result_free(result);
 	/* Shrink DB file size by actually wiping out SMS_3 table data */

To view, visit https://gerrit.osmocom.org/1750
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2680c60e26b9876b428d4b75323f884f9ecd95b3
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>

More information about the gerrit-log mailing list