diff options
| author | Connor E <38229097+c-edw@users.noreply.github.com> | 2019-01-18 12:27:42 +0000 |
|---|---|---|
| committer | Connor E <38229097+c-edw@users.noreply.github.com> | 2019-01-18 12:27:42 +0000 |
| commit | 291bae1e4426e698e29e31e819ebb6b2b5f02e23 (patch) | |
| tree | 72184bf9a0d5de14f07c8b539305a7f09a1d8bd7 /main.c | |
| parent | af03502384c2c8aa5c93f977a6dcd9df99af5cb3 (diff) | |
Remove VLAs.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -936,10 +936,11 @@ static int load_config(char *path, struct swaylock_state *state, } swaylock_log(LOG_DEBUG, "Config Line #%d: %s", line_number, line); - char flag[nread + 3]; + char *flag = malloc(nread + 3); sprintf(flag, "--%s", line); char *argv[] = {"swaylock", flag}; result = parse_options(2, argv, state, line_mode, NULL); + free(flag); if (result != 0) { break; } |
