issue from: code review https://github.com/antirez/redis/blob/503a5a24fb6cf3bd95590a53d14fce82086be52c/src/sds.c#L104 Why don't move this line under sh = s_malloc(hdrlen+initlen+1);? Because this command memset(sh, 0, hdrlen+initlen+1); has used the pointer sh,if sh is NULL, memset will work wrong

Comment From: oranagra

@antirez we have multiple complains about this, although our allocator never returns NULL (it panics instead), maybe merge one of them e.g. #6796 just so that people stop complaining about it?

Comment From: antirez

@oranagra just updated SDS that was already fixed upstream. Thanks.