Remove unnecessary free() calls
authorWouter Verhelst <w@uter.be>
Sat, 5 Jan 2013 01:08:48 +0000 (02:08 +0100)
committerWouter Verhelst <w@uter.be>
Sat, 5 Jan 2013 01:08:48 +0000 (02:08 +0100)
Technically this is a leak, but it does no harm to leave them there:
- It may aid in debugging
- future features (try pronouncing that! ;-) may use these values for
  other purposes
- additionally, while the pointers are freed, they're not set to NULL,
  which makes them unsafe dirty pointers. That's actually worse than not
  being freed, in my opinion.

nbd-server.c

index 12151bba68de6b3d8c5c020479a1f016a885c6ef..0e5475950f0326669574f86c9d0ab08a52527892 100644 (file)
@@ -2744,10 +2744,5 @@ int main(int argc, char *argv[]) {
        setup_servers(servers, genconf.modernaddr, genconf.modernport);
        dousers(genconf.user, genconf.group);
 
-        g_free(genconf.user);
-        g_free(genconf.group);
-        g_free(genconf.modernaddr);
-        g_free(genconf.modernport);
-
        serveloop(servers);
 }