Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
#include <X11/Xlib.h>
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
#include "xmodmap.h"
#define NOTINFILEFILENAME "commandline"
register char c = buffer[i];
if (!(isspace(c) || c == '\n')) break;
}
- if (i == len) return;
+ if (i == len) goto done;
cp = &buffer[i];
- if (*cp == '!') return; /* look for comments */
+ if (*cp == '!') goto done; /* look for comments */
len -= (cp - buffer); /* adjust len by how much we skipped */
/* pipe through cpp */
/* handle input */
handle_line (cp, len);
+
+ done:
+ free(buffer);
}