git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33d20f9
)
s3:samlogon_cache: fix O3 error unused result of truncate
author
Michael Adam
<obnox@samba.org>
Tue, 5 Apr 2016 14:47:39 +0000
(16:47 +0200)
committer
Michael Adam
<obnox@samba.org>
Thu, 12 May 2016 22:16:16 +0000
(
00:16
+0200)
in netsamlogon_cache_init()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
source3/libsmb/samlogon_cache.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/samlogon_cache.c
b/source3/libsmb/samlogon_cache.c
index c408082e8060e054ad51529c32614f7be018cfbc..7be54792fff54a80dc3b3a6bcc2fbe651b7461c6 100644
(file)
--- a/
source3/libsmb/samlogon_cache.c
+++ b/
source3/libsmb/samlogon_cache.c
@@
-77,7
+77,13
@@
clear:
first_try = false;
DEBUG(0,("retry after truncate for '%s'\n", path));
- truncate(path, 0);
+ ret = truncate(path, 0);
+ if (ret == -1) {
+ DBG_ERR("truncate failed: %s\n", strerror(errno));
+ talloc_free(path);
+ return false;
+ }
+
goto again;
}