[PATCH] 0000326: SMSbox CRASH: PANIC: gwlib/list.c:502: lock: Assertion

"Vincent CHAVANIS" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <0f6d01c6a055$4d171320$9600a8c0@vince>
We have here an issue :


-list is not checked in gwlist_delete_equal()
So if dict_get(conn_pool, key) returns NULL the process panic.



diff -rau /gateway-cvs/gwlib/http.c /gateway/gwlib/http.c
--- /gateway-cvs/gwlib/http.c   2006-04-01 19:45:13.000000000 +0200
+++ /gateway/gwlib/http.c       2006-06-26 20:08:53.000000000 +0200
@@ -848,7 +848,7 @@
         List *list;
         mutex_lock(conn_pool_lock);
         list = dict_get(conn_pool, key);
-        if (gwlist_delete_equal(list, conn) > 0) {
+        if (list != NULL && gwlist_delete_equal(list, conn) > 0) {
             /*
              * ok, connection was still within pool. So it's
              * safe to destroy this connection.



--
Telemaque - NICE - (FR)
Service Technique - Developpement
http://www.telemaque.fr/
[email protected]
Tel : +33 4 93 97 71 64 (fax 68)

_______________________________________________
devel mailing list
[email protected]
http://www.kannel.org/mailman/listinfo/devel
http_keepalive_crash.txt (text/plain, 561 B)
diff -rau /gateway-cvs/gwlib/http.c /gateway/gwlib/http.c
--- /gateway-cvs/gwlib/http.c   2006-04-01 19:45:13.000000000 +0200
+++ /gateway/gwlib/http.c       2006-06-26 20:08:53.000000000 +0200
@@ -848,7 +848,7 @@
         List *list;
         mutex_lock(conn_pool_lock);
         list = dict_get(conn_pool, key);
-        if (gwlist_delete_equal(list, conn) > 0) {
+        if (list != NULL && gwlist_delete_equal(list, conn) > 0) {
             /*
              * ok, connection was still within pool. So it's
              * safe to destroy this connection.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.