summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-09 14:47:43 +0100
committerVolker Lendecke <vl@samba.org>2012-03-09 19:01:06 +0100
commit177c61bd72af3f8bf4bad5221e1ff67084bde397 (patch)
tree6c04923bc6033f8030bf20480c024262390a131f /source3/smbd
parent8a75d3d91e90cc0cf617f06c63660d354684a60b (diff)
downloadsamba-177c61bd72af3f8bf4bad5221e1ff67084bde397.tar.gz
samba-177c61bd72af3f8bf4bad5221e1ff67084bde397.tar.bz2
samba-177c61bd72af3f8bf4bad5221e1ff67084bde397.zip
s3: asprintf->talloc_asprintf
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Mar 9 19:01:06 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/notify.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 4357af412e..37d585b896 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -193,9 +193,11 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
}
/* Do notify operations on the base_name. */
- if (asprintf(&fullpath, "%s/%s", fsp->conn->connectpath,
- fsp->fsp_name->base_name) == -1) {
- DEBUG(0, ("asprintf failed\n"));
+ fullpath = talloc_asprintf(
+ talloc_tos(), "%s/%s", fsp->conn->connectpath,
+ fsp->fsp_name->base_name);
+ if (fullpath == NULL) {
+ DEBUG(0, ("talloc_asprintf failed\n"));
TALLOC_FREE(fsp->notify);
return NT_STATUS_NO_MEMORY;
}
@@ -211,7 +213,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
}
status = notify_add(fsp->conn->notify_ctx, &e, notify_callback, fsp);
- SAFE_FREE(fullpath);
+ TALLOC_FREE(fullpath);
return status;
}