git: sbin/hammer2: Fix minor strdup(3) leak

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Mar 17 00:27:07 PDT 2023


commit 295a3ae3433b84e3b2d935d7fb1e2df54bf0618e
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Fri Mar 17 00:07:07 2023 -0700

    sbin/hammer2: Fix minor strdup(3) leak
    
    strchr(3) moves p while in the loop,
    so p is usually NULL when free(3) is called.

Summary of changes:
 sbin/hammer2/ondisk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/295a3ae3433b84e3b2d935d7fb1e2df54bf0618e


-- 
DragonFly BSD source repository


More information about the Commits mailing list