Module: kamailio
Branch: master
Commit: c82bbf03c1060ab28d93dea39daa57d6f8bac1ba
URL: 
https://github.com/kamailio/kamailio/commit/c82bbf03c1060ab28d93dea39daa57d6f8bac1ba

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-01-20T09:10:28+01:00

core: data lump - use LUMPFLAG_DUPED as flag everywhere

---

Modified: src/core/data_lump.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c82bbf03c1060ab28d93dea39daa57d6f8bac1ba.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c82bbf03c1060ab28d93dea39daa57d6f8bac1ba.patch

---

diff --git a/src/core/data_lump.c b/src/core/data_lump.c
index 9932ffcd890..1c1c4ac1751 100644
--- a/src/core/data_lump.c
+++ b/src/core/data_lump.c
@@ -557,7 +557,7 @@ static struct lump *dup_lump_list_r(
        }
 
        memcpy(new_lump, l, sizeof(struct lump));
-       new_lump->flags = LUMPFLAG_DUPED;
+       new_lump->flags |= LUMPFLAG_DUPED;
        new_lump->next = new_lump->before = new_lump->after = 0;
 
        switch(dir) {
@@ -625,7 +625,7 @@ void free_duped_lump_list(struct lump *l)
                         * duped list, remove it completely, preserve it
                         * otherwise (it is still referred by original list)
                         */
-                       if(foo->flags != LUMPFLAG_DUPED)
+                       if(!(foo->flags & LUMPFLAG_DUPED))
                                free_lump(foo);
                        pkg_free(foo);
                }
@@ -633,13 +633,13 @@ void free_duped_lump_list(struct lump *l)
                while(r) {
                        foo = r;
                        r = r->after;
-                       if(foo->flags != LUMPFLAG_DUPED) /* (+) ... see above */
+                       if(!(foo->flags & LUMPFLAG_DUPED)) /* (+) ... see above 
*/
                                free_lump(foo);
                        pkg_free(foo);
                }
 
                /*clean current elem*/
-               if(crt->flags != LUMPFLAG_DUPED) /* (+) ... see above */
+               if(!(crt->flags & LUMPFLAG_DUPED)) /* (+) ... see above */
                        free_lump(crt);
                pkg_free(crt);
        }

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to