summaryrefslogtreecommitdiffstats
path: root/source/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-02-25 15:24:49 +0100
committerVolker Lendecke <vl@samba.org>2008-02-25 16:09:26 +0100
commitad37b7b0aee265a3e4d8b7552610f4b9a105434d (patch)
tree56230430209f118f60cae5379b14576cc55590c4 /source/passdb
parent71641f04d4e9a41775e898f2e4ac3c8792783cd3 (diff)
downloadsamba-ad37b7b0aee265a3e4d8b7552610f4b9a105434d.tar.gz
samba-ad37b7b0aee265a3e4d8b7552610f4b9a105434d.tar.xz
samba-ad37b7b0aee265a3e4d8b7552610f4b9a105434d.zip
Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
Diffstat (limited to 'source/passdb')
-rw-r--r--source/passdb/machine_sid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/passdb/machine_sid.c b/source/passdb/machine_sid.c
index d1599047a7b..8fafcbbbd46 100644
--- a/source/passdb/machine_sid.c
+++ b/source/passdb/machine_sid.c
@@ -128,7 +128,10 @@ static DOM_SID *pdb_generate_sam_sid(void)
}
/* check for an old MACHINE.SID file for backwards compatibility */
- asprintf(&fname, "%s/MACHINE.SID", lp_private_dir());
+ if (asprintf(&fname, "%s/MACHINE.SID", lp_private_dir()) == -1) {
+ SAFE_FREE(sam_sid);
+ return NULL;
+ }
if (read_sid_from_file(fname, sam_sid)) {
/* remember it for future reference and unlink the old MACHINE.SID */