diff options
author | Michael Adam <obnox@samba.org> | 2016-03-26 02:08:41 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-05-13 00:16:15 +0200 |
commit | b64a24eb056e2abbc5364bcc01e994e1ccaa9b9f (patch) | |
tree | 45abf3c6b9e62d481fa3222e4b5eed37b6e4f90e /source4/ntvfs | |
parent | 8e521379d598d6ddf2d6967d70381eee2c1968b7 (diff) | |
download | samba-b64a24eb056e2abbc5364bcc01e994e1ccaa9b9f.tar.gz |
s4:ntvfs: fix O3 error unused result of asprintf in svfs_file_utime
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/simple/svfs_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c index c4e015668c7..171813bea21 100644 --- a/source4/ntvfs/simple/svfs_util.c +++ b/source4/ntvfs/simple/svfs_util.c @@ -158,7 +158,12 @@ int svfs_file_utime(int fd, struct utimbuf *times) char *fd_path = NULL; int ret; - asprintf(&fd_path, "/proc/self/%d", fd); + ret = asprintf(&fd_path, "/proc/self/%d", fd); + if (ret == -1) { + errno = ENOMEM; + return -1; + } + if (!fd_path) { errno = ENOMEM; return -1; |