From: Kamalesh Babulal Date: Fri, 11 Aug 2023 06:55:04 +0000 (+0530) Subject: src/daemon/cgrulesengd.c: fix coding style complaint X-Git-Tag: v3.2.0~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35ca3404b62a86b5e1e42e1108c3ffa139540319;p=thirdparty%2Flibcgroup.git src/daemon/cgrulesengd.c: fix coding style complaint Fix the checkpatch.pl warnings, making it coding style complaint. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c index 51988de5..dc396900 100644 --- a/src/daemon/cgrulesengd.c +++ b/src/daemon/cgrulesengd.c @@ -223,6 +223,7 @@ static int cgre_store_parent_info(pid_t pid) if (array_pi.index >= array_pi.num_allocation) { int alloc = array_pi.num_allocation + NUM_PER_REALLOCATIOM; void *new_array = realloc(array_pi.parent_info, sizeof(info) * alloc); + if (!new_array) { flog(LOG_WARNING, "Failed to allocate memory\n"); return 1; @@ -314,6 +315,7 @@ static int cgre_store_unchanged_process(pid_t pid, int flags) if (array_unch.index >= array_unch.num_allocation) { int alloc = array_unch.num_allocation + NUM_PER_REALLOCATIOM; void *new_array = realloc(array_unch.proc, sizeof(unchanged_pid_t) * alloc); + if (!new_array) { flog(LOG_WARNING, "Failed to allocate memory\n"); return 1;