From fabf62c065a62166c4ad1871a7e98798016cfeb4 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Thu, 30 Oct 2014 17:23:12 +0100 Subject: [PATCH 1/2] Coverity 72739 Coverity 72739 --- server/core/dbusers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/core/dbusers.c b/server/core/dbusers.c index 5f6943a3b..8a114cb39 100644 --- a/server/core/dbusers.c +++ b/server/core/dbusers.c @@ -897,6 +897,10 @@ static void *uh_keydup(void* key) { MYSQL_USER_HOST *current_key = (MYSQL_USER_HOST *)key; if (key == NULL || rval == NULL || current_key == NULL || current_key->user == NULL) { + if (rval) { + free(rval); + } + return NULL; } From 41f016df187581c2f1cee97556d74ecf813af3e1 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Thu, 30 Oct 2014 17:26:55 +0100 Subject: [PATCH 2/2] Coverity 72644 Coverity 72644 --- server/core/gw_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/gw_utils.c b/server/core/gw_utils.c index d5ee3e429..f76fb583b 100644 --- a/server/core/gw_utils.c +++ b/server/core/gw_utils.c @@ -175,7 +175,7 @@ void gw_daemonize(void) { int parse_bindconfig(char *config, unsigned short def_port, struct sockaddr_in *addr) { -char *port, buf[1024]; +char *port, buf[1024 + 1]; short pnum; struct hostent *hp;