summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-07 12:11:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:00:46 -0500
commit09eb876ac0f23f840042aed9bc891d25520636e8 (patch)
tree5f2f06c2ea3f3cbcd904d3ceb6d5effb16cce0e9 /source4/ntvfs/posix
parent26c9cd62118df387d03b1f467fa6bf07cf57d7ec (diff)
downloadsamba-09eb876ac0f23f840042aed9bc891d25520636e8.tar.gz
samba-09eb876ac0f23f840042aed9bc891d25520636e8.tar.bz2
samba-09eb876ac0f23f840042aed9bc891d25520636e8.zip
r14961: fix compiler warning
tridge: please add checks after talloc_realloc() and talloc_strdup()! metze (This used to be commit c136191870f91d4ce652da535a1cd52f4772574d)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_notify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c
index 652a5260d5..b5f2ad167a 100644
--- a/source4/ntvfs/posix/pvfs_notify.c
+++ b/source4/ntvfs/posix/pvfs_notify.c
@@ -109,11 +109,13 @@ static void pvfs_notify_callback(void *private, const struct notify_event *ev)
{
struct pvfs_notify_buffer *n = talloc_get_type(private, struct pvfs_notify_buffer);
size_t len;
+ char *new_path;
n->changes = talloc_realloc(n, n->changes, struct notify_changes, n->num_changes+1);
n->changes[n->num_changes].action = ev->action;
- n->changes[n->num_changes].name.s = talloc_strdup(n->changes, ev->path);
- string_replace(n->changes[n->num_changes].name.s, '/', '\\');
+ new_path = talloc_strdup(n->changes, ev->path);
+ string_replace(new_path, '/', '\\');
+ n->changes[n->num_changes].name.s = new_path;
n->num_changes++;
/*