summaryrefslogtreecommitdiff
path: root/source4/lib/samba3/smbpasswd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/samba3/smbpasswd.c')
-rw-r--r--source4/lib/samba3/smbpasswd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/samba3/smbpasswd.c b/source4/lib/samba3/smbpasswd.c
index 5976d2db57..fe0780c8d3 100644
--- a/source4/lib/samba3/smbpasswd.c
+++ b/source4/lib/samba3/smbpasswd.c
@@ -219,6 +219,11 @@ NTSTATUS samba3_read_smbpasswd(const char *filename, TALLOC_CTX *ctx, struct sam
lines = file_lines_load(filename, &numlines, ctx);
+ if (lines == NULL) {
+ DEBUG(0, ("Unable to load lines from %s\n", filename));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+
*accounts = talloc_array(ctx, struct samba3_samaccount, numlines);
for (i = 0; i < numlines; i++) {