From 604486b0a381d3a25b879c79b54005db1096d6d4 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 2 Nov 2015 11:11:49 +0800 Subject: [PATCH] for #515, use srs_freepa to free array. --- trunk/src/protocol/srs_kafka_stack.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trunk/src/protocol/srs_kafka_stack.cpp b/trunk/src/protocol/srs_kafka_stack.cpp index be5dc365e6..aff3ec0f5f 100644 --- a/trunk/src/protocol/srs_kafka_stack.cpp +++ b/trunk/src/protocol/srs_kafka_stack.cpp @@ -55,7 +55,7 @@ SrsKafkaString::SrsKafkaString(string v) SrsKafkaString::~SrsKafkaString() { - srs_freep(data); + srs_freepa(data); } bool SrsKafkaString::null() @@ -80,7 +80,7 @@ string SrsKafkaString::to_str() void SrsKafkaString::set_value(string v) { // free previous data. - srs_freep(data); + srs_freepa(data); // copy new value to data. _size = (int16_t)v.length(); @@ -147,7 +147,7 @@ int SrsKafkaString::decode(SrsBuffer* buf) return ret; } - srs_freep(data); + srs_freepa(data); data = new char[_size]; buf->read_bytes(data, _size); @@ -171,7 +171,7 @@ SrsKafkaBytes::SrsKafkaBytes(const char* v, int nb_v) SrsKafkaBytes::~SrsKafkaBytes() { - srs_freep(_data); + srs_freepa(_data); } char* SrsKafkaBytes::data() @@ -202,7 +202,7 @@ void SrsKafkaBytes::set_value(string v) void SrsKafkaBytes::set_value(const char* v, int nb_v) { // free previous data. - srs_freep(_data); + srs_freepa(_data); // copy new value to data. _size = (int16_t)nb_v; @@ -280,7 +280,7 @@ int SrsKafkaBytes::decode(SrsBuffer* buf) return ret; } - srs_freep(_data); + srs_freepa(_data); _data = new char[_size]; buf->read_bytes(_data, _size);