NETWORKER: fix memleak.
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 29 Jan 2013 22:15:53 +0000 (23:15 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 29 Jan 2013 22:15:53 +0000 (23:15 +0100)
citadel/modules/network/serv_network.c

index f65dda3e496fd4bdc4076e78eabb077602956981..ebc00e04c1dc6aab4d4f05ba5e7eeeb2474ff0ee 100644 (file)
@@ -529,7 +529,9 @@ void network_do_queue(void)
        /* Save the network map back to disk */
        if (netmap_changed) {
                StrBuf *MapStr = CtdlSerializeNetworkMap(the_netmap);
-               CtdlPutSysConfig(IGNETMAP, SmashStrBuf(&MapStr));
+               char *pMapStr = SmashStrBuf(&MapStr);
+               CtdlPutSysConfig(IGNETMAP, pMapStr);
+               free(pMapStr);
        }
 
        /* combine singe message files into one spool entry per remote node. */