From 7b918730168851586416b22d2197fc6ce7be0638 Mon Sep 17 00:00:00 2001 From: atheik Date: Sun, 1 May 2022 00:48:26 +0300 Subject: cifs-utils: don't return uninitialized value in cifs_gss_get_req If the first malloc fails, maj_stat is uninitialized and used as the return value through the GSS_ERROR() macro. Use GSS_S_FAILURE to indicate a miscellaneous error. Signed-off-by: atheik --- cifs.upcall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cifs.upcall.c b/cifs.upcall.c index 922d644..52c0328 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -795,6 +795,7 @@ cifs_gss_get_req(const char *host, DATA_BLOB *mechtoken, DATA_BLOB *sess_key) char *service_name = malloc(service_name_len); if (!service_name) { syslog(LOG_DEBUG, "out of memory allocating service name"); + maj_stat = GSS_S_FAILURE; goto out; } -- cgit v1.2.3