From 08871bf6f0ac5dd8afc6a571b43e7948de4ac832 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 21 Feb 2011 16:38:39 -0800 Subject: [PATCH] socket-util: Free strings in make_sockaddr_un() error handling. Coverity #10721,10720 --- lib/socket-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/socket-util.c b/lib/socket-util.c index 469131d4..275bf309 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -270,6 +270,8 @@ make_sockaddr_un(const char *name, struct sockaddr_un *un, socklen_t *un_len, dirfd = open(dir, O_DIRECTORY | O_RDONLY); if (dirfd < 0) { + free(base); + free(dir); return errno; } -- 2.30.2