summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jeremy@jeremy-desktop.(none)>2008-12-23 12:11:12 -0800
committerJeremy Allison <jeremy@jeremy-desktop.(none)>2008-12-23 12:11:12 -0800
commitd0eeb9aa8db42ed1fc18024614560820354e6dfa (patch)
tree4b981ba4aa23fe1a9d53139a135018cbbd5871b5 /source3/locking
parent1966a947d3f8d432d3af5a9c0004e27561ae7f65 (diff)
downloadsamba-d0eeb9aa8db42ed1fc18024614560820354e6dfa.tar.gz
samba-d0eeb9aa8db42ed1fc18024614560820354e6dfa.tar.bz2
samba-d0eeb9aa8db42ed1fc18024614560820354e6dfa.zip
Fix more asprintf warnings and some error path errors.
Jeremy.
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/posix.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index c036ee597c..9b51c3aa6a 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -909,13 +909,12 @@ new: start=%.0f,size=%.0f\n", (double)l_curr->start, (double)l_curr->size,
*/
char *msg = NULL;
- /* Don't check if alloc succeeds here - we're
- * forcing a core dump anyway. */
-
- asprintf(&msg, "logic flaw in cases: l_curr: start = %.0f, size = %.0f : \
-lock: start = %.0f, size = %.0f", (double)l_curr->start, (double)l_curr->size, (double)lock->start, (double)lock->size );
-
- smb_panic(msg);
+ if (asprintf(&msg, "logic flaw in cases: l_curr: start = %.0f, size = %.0f : \
+lock: start = %.0f, size = %.0f", (double)l_curr->start, (double)l_curr->size, (double)lock->start, (double)lock->size ) != -1) {
+ smb_panic(msg);
+ } else {
+ smb_panic("posix_lock_list");
+ }
}
} /* end for ( l_curr = lhead; l_curr;) */
} /* end for (i=0; i<num_locks && ul_head; i++) */