registrar: use sruid_next_safe()
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 19 Sep 2018 06:33:14 +0000 (08:33 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 19 Sep 2018 06:33:14 +0000 (08:33 +0200)
src/modules/registrar/save.c

index 1432efe..2b39444 100644 (file)
@@ -404,7 +404,7 @@ static inline ucontact_info_t* pack_ci( struct sip_msg* _m, contact_t* _c,
                                goto error;
                        }
                }
-               if(sruid_next(&_reg_sruid)<0)
+               if(sruid_next_safe(&_reg_sruid)<0)
                        goto error;
                ci.ruid = _reg_sruid.uid;
                LM_DBG("generated ruid is: %.*s\n", ci.ruid.len, ci.ruid.s);