Use palloc instead of malloc

pull/6763/head
Gokhan Gulbiz 2023-03-13 10:13:28 +03:00
parent 7f0c502660
commit 81cf3cf408
No known key found for this signature in database
GPG Key ID: 608EF06B6BD1B45B
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }