authselect/SOURCES/0024-lib-fix-memory-leak-in...

30 lines
908 B
Diff

From 6445037ae9ba55abd1bd7ca2f0028081c26c0b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Tue, 20 Nov 2018 12:18:49 +0100
Subject: [PATCH 06/15] lib: fix memory leak in authselect_profile_free
Resolves:
https://github.com/pbrezina/authselect/issues/116
---
src/lib/authselect_profile.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lib/authselect_profile.c b/src/lib/authselect_profile.c
index 6f949a4ef6fb4159f89038a9cd705de475b5cf22..8a12a082802fbc4f3c8cb3af7379ad26372dcc0c 100644
--- a/src/lib/authselect_profile.c
+++ b/src/lib/authselect_profile.c
@@ -130,6 +130,10 @@ authselect_profile_free(struct authselect_profile *profile)
free(profile->path);
}
+ if (profile->name != NULL) {
+ free(profile->name);
+ }
+
if (profile->description != NULL) {
free(profile->description);
}
--
2.17.2