Code

frontend: Free strdup()'ed username when destroying a connection.
authorSebastian Harl <sh@tokkee.org>
Tue, 22 Apr 2014 18:27:44 +0000 (20:27 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 22 Apr 2014 18:27:44 +0000 (20:27 +0200)
src/frontend/connection.c

index 93829ab248dc3992eca7124b1c6a8f95bd035345..aa0325570171c9f6f0807edc92c953ace241004d 100644 (file)
@@ -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);