disk-label: fix memory leakages

Avoid a strdup() call.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@867 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-09-28 18:59:47 +00:00
parent 6809d8d187
commit 580ad853b5

View File

@@ -64,9 +64,6 @@ dlabel_open( dlabel_info_t *di )
cell status;
path = my_args_copy();
if (!path) {
path = strdup("");
}
DPRINTF("dlabel-open '%s'\n", path );
@@ -122,14 +119,14 @@ dlabel_open( dlabel_info_t *di )
DPRINTF("Located filesystem with ph " FMT_ucellx "\n", ph);
DPRINTF("path: %s length: %d\n", path, strlen(path));
if (strlen(path)) {
if (path && strlen(path)) {
DPRINTF("INTERPOSE!\n");
push_str( path );
PUSH_ph( ph );
fword("interpose");
}
} else if (*path && strcmp(path, "%BOOT") != 0) {
} else if (path && strcmp(path, "%BOOT") != 0) {
goto out;
}