diff mbox series

[19/19] Removed a resource leak from nfsdcltrack/sqlite.c

Message ID 20190508133536.6077-20-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series Covertity Scan: Removed resources leaks | expand

Commit Message

Steve Dickson May 8, 2019, 1:35 p.m. UTC
nfsdcltrack/sqlite.c:218: leaked_storage: Variable "err" going out
	of scope leaks the storage it points to.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/nfsdcltrack/sqlite.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
index c59f777..2801201 100644
--- a/utils/nfsdcltrack/sqlite.c
+++ b/utils/nfsdcltrack/sqlite.c
@@ -215,6 +215,8 @@  sqlite_maindb_init_v2(void)
 				&err);
 	if (ret != SQLITE_OK) {
 		xlog(L_ERROR, "Unable to begin transaction: %s", err);
+		if (err)
+			sqlite3_free(err);
 		return ret;
 	}