Module: kamailio
Branch: master
Commit: 4348049e4f455309523bfbf285d0f462c57c9c49
URL:
https://github.com/kamailio/kamailio/commit/4348049e4f455309523bfbf285d0f46…
Author: Andreas Granig <agranig(a)sipwise.com>
Committer: Andreas Granig <agranig(a)sipwise.com>
Date: 2018-03-12T16:21:27+01:00
db_redis: Fix free(0) on inserting null value
---
Modified: src/modules/db_redis/redis_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4348049e4f455309523bfbf285d0f46…
Patch:
https://github.com/kamailio/kamailio/commit/4348049e4f455309523bfbf285d0f46…
---
diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c
index 48bcf343d3..273ee59cbb 100644
--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -1850,7 +1850,8 @@ int db_redis_insert(const db1_con_t* _h, const db_key_t* _k, const
db_val_t* _v,
LM_ERR("Failed to add column value to insert query\n");
goto error;
}
- pkg_free(v.s);
+ if (v.s)
+ pkg_free(v.s);
}
reply = db_redis_command_argv(con, query_v);