From 2dabc6d4ffda653cf3762a1fcbde2f3902ef1b32 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife <55228370+AUnicornWithNoLife@users.noreply.github.com> Date: Sun, 17 Sep 2023 19:31:21 +0100 Subject: [PATCH] Update carg-parse.c --- carg-parse.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/carg-parse.c b/carg-parse.c index 5848a55..db8e723 100644 --- a/carg-parse.c +++ b/carg-parse.c @@ -92,24 +92,10 @@ carg_parse_data* carg_parse(int argc, char** argv) void carg_parse_free(carg_parse_data* data) { - if (data->values != NULL) - { - free(data->values); - } - - if (data->lv_labels != NULL) - { - free(data->lv_labels); - } - if (data->lv_values != NULL) - { - free(data->lv_values); - } - - if (data->flags != NULL) - { - free(data->flags); - } + free(data->values); + free(data->lv_labels); + free(data->lv_values); + free(data->flags); free(data); }