fixed small memory leak (free old devnull names when setting new ones)
authorpk910 <philipp@zoelle1.de>
Mon, 12 Dec 2011 18:07:54 +0000 (19:07 +0100)
committerpk910 <philipp@zoelle1.de>
Mon, 12 Dec 2011 18:07:54 +0000 (19:07 +0100)
src/nickserv.c

index a370fd4463d923d00bb6e1dd12235190501c8de9..9e3aed7dd43d5db3bb36cc184b97cc56932303ec 100644 (file)
@@ -2447,6 +2447,8 @@ static OPTION_FUNC(opt_devnull)
         } else {
             devnull = unsplit_string(argv+1, argc-1, NULL);
             if(devnull_check(devnull) == 1) { 
+                if(hi->devnull)
+                    free(hi->devnull);
                 hi->devnull = strdup(devnull);
             }
         }