summaryrefslogtreecommitdiff
path: root/source3/client/mount.cifs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/mount.cifs.c')
-rwxr-xr-xsource3/client/mount.cifs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 23a74d34fa..ac98b992bb 100755
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -259,6 +259,11 @@ static int get_password_from_file(int file_descript, char * filename)
else
memset(mountpassword, 0, 64);
+ if (mountpassword == NULL) {
+ printf("malloc failed\n");
+ exit(1);
+ }
+
if(filename != NULL) {
file_descript = open(filename, O_RDONLY);
if(file_descript < 0) {