Code

frontend: Fixed a memory leak in an error condition in FETCH.
authorSebastian Harl <sh@tokkee.org>
Fri, 27 Feb 2015 17:13:22 +0000 (18:13 +0100)
committerSebastian Harl <sh@tokkee.org>
Fri, 27 Feb 2015 17:13:22 +0000 (18:13 +0100)
src/frontend/query.c

index aef0ddcc6d7112300f6d1aca90fbd42062b43650..2c80be76f84f5ee8ca98560cebf293219c238e31 100644 (file)
@@ -321,6 +321,7 @@ sdb_fe_exec_fetch(sdb_conn_t *conn, int type,
                sdb_strbuf_sprintf(conn->errbuf, "Failed to fetch %s %s: "
                                "host %s not found", SDB_STORE_TYPE_TO_NAME(type),
                                name, hostname);
+               sdb_object_deref(SDB_OBJ(host));
                return -1;
        }
        if (type == SDB_HOST) {