From: Alejandro Colomar Date: Sat, 4 Jan 2025 00:47:16 +0000 (+0100) Subject: lib/tcbfuncs.c: shadowtcb_path_rel(): Use strdup(3) instead of its pattern X-Git-Tag: 4.18.0-rc1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=638c31c352cb662375c38eacc082e7cfa9d8cc74;p=thirdparty%2Fshadow.git lib/tcbfuncs.c: shadowtcb_path_rel(): Use strdup(3) instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/tcbfuncs.c b/lib/tcbfuncs.c index e40c5eeac..237d46e87 100644 --- a/lib/tcbfuncs.c +++ b/lib/tcbfuncs.c @@ -72,7 +72,7 @@ static /*@null@*/ char *shadowtcb_path_rel (const char *name, uid_t uid) char *ret; if (!getdef_bool ("TCB_SYMLINKS") || uid < SHADOWTCB_HASH_BY) { - ret = aprintf("%s", name); + ret = strdup(name); if (ret == NULL) { OUT_OF_MEMORY; return NULL;