s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_file_utime()
authorMichael Adam <obnox@samba.org>
Tue, 5 Apr 2016 10:18:17 +0000 (12:18 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 12 May 2016 22:16:15 +0000 (00:16 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
source4/ntvfs/cifs_posix_cli/svfs_util.c

index a9e6ba49925b643d97bdcfb7e7303ed4b5ef9ce2..cf881a1c9ae215a5a2c95e954f8fa152de08dc0c 100644 (file)
@@ -165,7 +165,11 @@ int cifspsx_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) {
+               return -1;
+       }
+
        if (!fd_path) {
                errno = ENOMEM;
                return -1;