jshn: main: fix leak of memory pointed to by 'vars'

Fixes following leak of memory:

 6,016 bytes in 1 blocks are possibly lost in loss record 1 of 1
    at 0x4C31B25: calloc
    by 0x1098F8: main (jshn.c:353)

Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Petr Štetiar 2019-11-19 12:34:14 +01:00
parent 93848ec96d
commit c42f11cc7c

3
jshn.c
View file

@ -443,12 +443,15 @@ int main(int argc, char **argv)
indent = true; indent = true;
break; break;
default: default:
free(vars);
return usage(argv[0]); return usage(argv[0]);
} }
} }
free(vars);
return usage(argv[0]); return usage(argv[0]);
exit: exit:
free(vars);
return ret; return ret;
} }