I think this is a false positive, since getline()
expects explicitly handles pointer to NULL and allocates for it.
See https://man7.org/linux/man-pages/man3/getline.3.html:
getline() reads an entire line from stream, storing the address of the buffer containing the text into *lineptr. The buffer is null-terminated and includes the newline character, if one was found. If *lineptr is set to NULL before the call, then getline() will allocate a buffer for storing the line.
If a private message is started, I can share a reproducer archive.