mirror of https://github.com/citusdata/citus.git
Use palloc instead of malloc
parent
024526ab2f
commit
fda680d22e
|
@ -690,7 +690,7 @@ extractTopComment(const char *inputString)
|
||||||
|
|
||||||
if (i > 2)
|
if (i > 2)
|
||||||
{
|
{
|
||||||
char *result = (char *) malloc(sizeof(char) * (i - 1));
|
char *result = (char *) palloc(sizeof(char) * (i - 1));
|
||||||
strncpy(result, inputString + 2, i - 2);
|
strncpy(result, inputString + 2, i - 2);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue