From 95151b82610bd542d27b5372503f9afffaccd859 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 22 Apr 2014 20:27:44 +0200 Subject: [PATCH] frontend: Free strdup()'ed username when destroying a connection. --- src/frontend/connection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 93829ab..aa03255 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -145,6 +145,10 @@ connection_destroy(sdb_object_t *obj) close(conn->fd); conn->fd = -1; + if (conn->username) + free(conn->username); + conn->username = NULL; + sdb_strbuf_destroy(conn->buf); conn->buf = NULL; sdb_strbuf_destroy(conn->errbuf); -- 2.30.2