summaryrefslogtreecommitdiff
path: root/cifs.upcall.c
diff options
context:
space:
mode:
authoratheik <atteh.mailbox@gmail.com>2022-05-01 00:48:26 +0300
committerPavel Shilovsky <piastryyy@gmail.com>2022-06-13 10:45:18 -0700
commit7b918730168851586416b22d2197fc6ce7be0638 (patch)
tree341d556d6f6844b9190a6f12d970cce8a6137717 /cifs.upcall.c
parentd9f5447afbbe7d54f1315e6e2a246fc1a1fce311 (diff)
downloadcifs-utils-7b918730168851586416b22d2197fc6ce7be0638.tar.gz
cifs-utils-7b918730168851586416b22d2197fc6ce7be0638.tar.bz2
cifs-utils-7b918730168851586416b22d2197fc6ce7be0638.zip
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 <atteh.mailbox@gmail.com>
Diffstat (limited to 'cifs.upcall.c')
-rw-r--r--cifs.upcall.c1
1 files changed, 1 insertions, 0 deletions
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;
}