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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Feb 28 18:36:36 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: libmsc/update_db_revision_3(): free memleaking db result
......................................................................


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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



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 @@
 		LOGP(DDB, LOGL_ERROR,
 			"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: merged
Gerrit-Change-Id: I2680c60e26b9876b428d4b75323f884f9ecd95b3
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list