Browse code

pike: safety check for ll variable

Daniel-Constantin Mierla authored on 13/04/2021 07:50:07
Showing 1 changed files
... ...
@@ -245,8 +245,10 @@ void clean_routine(unsigned int ticks , void *param)
245 245
 
246 246
 			/* unlink the node -> the list will get shorter and it will be
247 247
 			 * faster for the next branches to process it */
248
-			ll->prev->prev->next = ll;
249
-			ll->prev = ll->prev->prev;
248
+			if(ll) {
249
+				ll->prev->prev->next = ll;
250
+				ll->prev = ll->prev->prev;
251
+			}
250 252
 			node->expires = 0;
251 253
 			node->timer_ll.prev = node->timer_ll.next = 0;
252 254
 			if ( node->flags&NODE_EXPIRED_FLAG )