mirror of https://github.com/citusdata/citus.git
Use palloc instead of malloc
parent
7f0c502660
commit
81cf3cf408
|
@ -599,7 +599,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