diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-04-10 16:02:40 +0200 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-04-10 16:02:40 +0200 |
commit | 42a9fabacefc5595cc37448e6493fa51f1b75bf5 (patch) | |
tree | fffb433afb3aa6e7212666431f73b6b91bb8998e | |
parent | 43d6810723ae64f597c17679357ae4a34f8498d1 (diff) | |
download | ratpoison-42a9fabacefc5595cc37448e6493fa51f1b75bf5.zip |
main: free display and alt_rcfile
* otherwise specifying -d or -f more than once would lead to
a memory leak
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -633,6 +633,7 @@ main (int argc, char *argv[]) cmd_count++; break; case 'd': + free (display); display = xstrdup (optarg); break; case 's': @@ -643,6 +644,7 @@ main (int argc, char *argv[]) interactive = 1; break; case 'f': + free (alt_rcfile); alt_rcfile = xstrdup (optarg); break; |