|
|
@ -1374,9 +1374,9 @@ int mosquitto_sub_topic_tokenise(const char *subtopic, char ***topics, int *coun
|
|
|
|
tlen = stop-start + 1;
|
|
|
|
tlen = stop-start + 1;
|
|
|
|
(*topics)[hier] = _mosquitto_calloc(tlen, sizeof(char));
|
|
|
|
(*topics)[hier] = _mosquitto_calloc(tlen, sizeof(char));
|
|
|
|
if(!(*topics)[hier]){
|
|
|
|
if(!(*topics)[hier]){
|
|
|
|
for(i=0; i<hier_count; i++){
|
|
|
|
for(j=0; j<hier_count; j++){
|
|
|
|
if((*topics)[hier]){
|
|
|
|
if((*topics)[j]){
|
|
|
|
_mosquitto_free((*topics)[hier]);
|
|
|
|
_mosquitto_free((*topics)[j]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_mosquitto_free((*topics));
|
|
|
|
_mosquitto_free((*topics));
|
|
|
|