svn commit: samba r14961 - in
branches/SAMBA_4_0/source/ntvfs/posix: .
metze at samba.org
metze at samba.org
Fri Apr 7 12:11:50 GMT 2006
Author: metze
Date: 2006-04-07 12:11:50 +0000 (Fri, 07 Apr 2006)
New Revision: 14961
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14961
Log:
fix compiler warning
tridge: please add checks after talloc_realloc() and talloc_strdup()!
metze
Modified:
branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 11:44:55 UTC (rev 14960)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_notify.c 2006-04-07 12:11:50 UTC (rev 14961)
@@ -109,11 +109,13 @@
{
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++;
/*
More information about the samba-cvs
mailing list