diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/exit-status.c | 8 | ||||
-rw-r--r-- | src/shared/exit-status.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c index ce1f1bde65..38d71e182d 100644 --- a/src/shared/exit-status.c +++ b/src/shared/exit-status.c @@ -208,3 +208,11 @@ bool is_clean_exit_lsb(int code, int status, ExitStatusSet *success_status) { code == CLD_EXITED && (status == EXIT_NOTINSTALLED || status == EXIT_NOTCONFIGURED); } + +void exit_status_set_free(ExitStatusSet *x) { + assert(x); + + set_free(x->code); + set_free(x->signal); + x->code = x->signal = NULL; +} diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h index 57d066f155..93abf7f10e 100644 --- a/src/shared/exit-status.h +++ b/src/shared/exit-status.h @@ -95,3 +95,5 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) _con bool is_clean_exit(int code, int status, ExitStatusSet *success_status); bool is_clean_exit_lsb(int code, int status, ExitStatusSet *success_status); + +void exit_status_set_free(ExitStatusSet *x); |