From b64a24eb056e2abbc5364bcc01e994e1ccaa9b9f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 26 Mar 2016 02:08:41 +0100 Subject: s4:ntvfs: fix O3 error unused result of asprintf in svfs_file_utime Signed-off-by: Michael Adam Reviewed-by: Christian Ambach --- source4/ntvfs/simple/svfs_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs') 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; -- cgit v1.2.1