mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
tools/dumpscan/pathname.c: properly check strdup() return value
Fix the check for strdup() running out of memory. Change-Id: I4e2d83036095c7b292ee4c386d8ed7b16ec75067 Reviewed-on: http://gerrit.openafs.org/8880 Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
0e83cde60e
commit
d9cc9c9dee
@ -278,7 +278,7 @@ Path_Build(XFILE * X, path_hashinfo * phi, afs_uint32 vnode, char **his_path,
|
||||
|
||||
if (vnode == 1) {
|
||||
*his_path = strdup("/");
|
||||
if (!his_path) {
|
||||
if (!*his_path) {
|
||||
if (phi->p->cb_error)
|
||||
(phi->p->cb_error) (ENOMEM, 1, phi->p->err_refcon,
|
||||
"No memory for pathname of vnode 1");
|
||||
|
Loading…
Reference in New Issue
Block a user