summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ne_locks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ne_locks.c b/src/ne_locks.c
index fbe390c..58e71c4 100644
--- a/src/ne_locks.c
+++ b/src/ne_locks.c
@@ -32,6 +32,7 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+#include <assert.h>
#include <ctype.h> /* for isdigit() */
@@ -332,6 +333,9 @@ void ne_lockstore_remove(ne_lock_store *store, struct ne_lock *lock)
for (item = store->locks; item != NULL; item = item->next)
if (item->lock == lock)
break;
+
+ /* API condition that lock is present in the store. */
+ assert(item);
if (item->prev != NULL) {
item->prev->next = item->next;