git: 3cfd08c1c740 - main - libkiconv: address memory leak in not-found cases
Ed Maste
emaste at FreeBSD.org
Thu Apr 22 23:33:36 UTC 2021
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=3cfd08c1c74058451a02bac35307bf7fa509c617
commit 3cfd08c1c74058451a02bac35307bf7fa509c617
Author: Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-04-21 17:45:27 +0000
Commit: Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-04-22 23:32:34 +0000
libkiconv: address memory leak in not-found cases
Found in "Understanding and Detecting Disordered Error Handling with
Precise Function Pairing" by Qiushi Wu et al.
Reviewed by: imp, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29896
---
lib/libkiconv/kiconv_sysctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/libkiconv/kiconv_sysctl.c b/lib/libkiconv/kiconv_sysctl.c
index da68b3011f36..841a162bfd27 100644
--- a/lib/libkiconv/kiconv_sysctl.c
+++ b/lib/libkiconv/kiconv_sysctl.c
@@ -59,6 +59,7 @@ kiconv_lookupconv(const char *drvname)
free(drivers);
return (0);
}
+ free(drivers);
}
return (ENOENT);
}
@@ -86,6 +87,7 @@ kiconv_lookupcs(const char *tocode, const char *fromcode)
return (0);
}
}
+ free(csi);
}
return (ENOENT);
}
More information about the dev-commits-src-main
mailing list