Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast committed Jan 21, 2025
1 parent 62cb46f commit e40ccfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/t_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ hashTypeEntry *hashTypeCreateEntry(sds field, sds value) {
if (field_is_sds5) field_size += 2;
size_t alloc_size = sizeof(void *) + field_size;
hashTypeEntryPtrValue *entry = zmalloc(alloc_size);
entry->value = sdsdup(value);
entry->value = value;
if (field_is_sds5) {
/* We can't use SDS_TYPE_5 to encode extra information in the unused
* allocation size, so convert to SDS_TYPE_8. */
Expand Down

0 comments on commit e40ccfd

Please sign in to comment.