WillAyd commented on code in PR #1049:
URL: https://github.com/apache/arrow-adbc/pull/1049#discussion_r1321833221
##########
c/driver/common/utils.c:
##########
@@ -166,17 +166,23 @@ void AppendErrorDetail(struct AdbcError* error, const
char* key, const uint8_t*
return;
}
- memcpy(new_keys, details->keys, sizeof(char*) * details->count);
- free(details->keys);
- details->keys = new_keys;
+ if (details->keys != NULL) {
+ memcpy(new_keys, details->keys, sizeof(char*) * details->count);
Review Comment:
TIL that C does have a way of declaring a pointer parameter that is not
NULL. I couldn't reproduce locally but these were failing on CI
Guessing the headers on the CI systems look something like:
https://stackoverflow.com/a/48830228/621736
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]