Code

conf: don't free filename in read_rc_file()
authorMax Kellermann <max@duempel.org>
Thu, 25 Dec 2008 13:08:59 +0000 (14:08 +0100)
committerMax Kellermann <max@duempel.org>
Thu, 25 Dec 2008 13:08:59 +0000 (14:08 +0100)
The code was unused, because free_filename was always 0.

src/conf.c

index 4a8bf503c733cbafb2c9593d411c98d4dc1e74ea..979fd91c4bfb8f7c26e877aba9e915dfb10ae021 100644 (file)
@@ -504,15 +504,12 @@ read_rc_file(char *filename)
 {
        int fd;
        int quit = 0;
-       int free_filename = 0;
 
        if (filename == NULL)
                return -1;
 
        if ((fd = open(filename,O_RDONLY)) < 0) {
                        perror(filename);
-                       if (free_filename)
-                               g_free(filename);
                        return -1;
                }
 
@@ -554,9 +551,6 @@ read_rc_file(char *filename)
                }
        }
 
-       if (free_filename)
-               g_free(filename);
-
        return 0;
 }