From e1d5c0c925597cfa6c427b1a5176a80e03ec8c29 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 31 Aug 2016 13:31:16 +0200 Subject: [PATCH] Do not allow multiple --config arguments Otherwise there is a small, unimportant memory leak. More important is the fact that later such flags overwrite earlier flags. Signed-off-by: Uli Schlachter --- awesome.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awesome.c b/awesome.c index 0f715967..16f5eed3 100644 --- a/awesome.c +++ b/awesome.c @@ -507,6 +507,8 @@ main(int argc, char **argv) run_test = true; break; case 'c': + if (confpath != NULL) + fatal("--config may only be specified once"); confpath = a_strdup(optarg); break; case 's':