forked from Mirrors/freeswitch
Merge pull request #436 from dragos-oancea/mod_redis-potential-memleak
[mod_redis] scan-build: Potential leak of memory pointed to by 'cptr' - cr_morebulk()
This commit is contained in:
commit
6f24d9b489
@ -177,8 +177,10 @@ static int cr_morebulk(cr_multibulk *mb, int size)
|
||||
|
||||
iptr = realloc(mb->idxs, total * sizeof(int));
|
||||
|
||||
if (iptr == NULL)
|
||||
if (iptr == NULL) {
|
||||
free(cptr);
|
||||
return CREDIS_ERR_NOMEM;
|
||||
}
|
||||
|
||||
mb->bulks = cptr;
|
||||
mb->idxs = iptr;
|
||||
|
Loading…
Reference in New Issue
Block a user