diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2015-04-09 13:54:26 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2015-04-09 13:54:26 +0000 |
commit | b3b79f624111eca33cf54c3198469bfc58671fca (patch) | |
tree | 448c07248c155d261931395d83129ba445a8372b /tables | |
parent | c9c361b9d20b79d7c2f152409509d1886e443e52 (diff) | |
download | libapr-b3b79f624111eca33cf54c3198469bfc58671fca.tar.gz |
skiplist: follow up to r1664769.
Fix insert_compare() returning NULL on the very first insertion (top is NULL).
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1672354 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r-- | tables/apr_skiplist.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c index 4078dd03e..6075bb60c 100644 --- a/tables/apr_skiplist.c +++ b/tables/apr_skiplist.c @@ -543,6 +543,10 @@ static apr_skiplistnode *insert_compare(apr_skiplist *sl, void *data, if (p) { p->up = tmp; } + else { + /* This sets ret to the bottom-most node we are inserting */ + ret = tmp; + } p = tmp; } if (sl->index != NULL) { |