Skip to content

Commit

Permalink
fixup! wip
Browse files Browse the repository at this point in the history
  • Loading branch information
slobodan-ilic committed Jun 4, 2024
1 parent 622301c commit 8b453bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/spss/readstat_sav_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ static readstat_error_t parse_mr_line(const char *line, mr_set_t *result) {
goto cleanup;
}

// Allocate memory for label
result->label = malloc(count + 1); // +1 for the null-terminator
if (result->label == NULL) {
if ((result->label = malloc(count + 1)) == NULL) {
retval = READSTAT_ERROR_MALLOC;
goto cleanup;
}
Expand Down

0 comments on commit 8b453bd

Please sign in to comment.