Module: sip-router Branch: master Commit: cc3a0b55fe8bdfc106ae782efe55bd0ac2f1be99 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cc3a0b55...
Author: Alex Hermann alex@speakup.nl Committer: Alex Hermann alex@speakup.nl Date: Thu Feb 2 10:40:35 2012 +0100
modules_k/pv: pv_trans buffer: malloc must allocate pointers, not bytes.
---
modules_k/pv/pv_trans.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/pv/pv_trans.c b/modules_k/pv/pv_trans.c index 22d3a9e..0b2f4d7 100644 --- a/modules_k/pv/pv_trans.c +++ b/modules_k/pv/pv_trans.c @@ -68,7 +68,7 @@ int tr_init_buffers(void) { int i;
- _tr_buffer_list = (char**)malloc(TR_BUFFER_SLOTS); + _tr_buffer_list = (char**)malloc(TR_BUFFER_SLOTS * sizeof(char*)); if(_tr_buffer_list==NULL) return -1; for(i=0; i<TR_BUFFER_SLOTS; i++) {