@@ -523,7 +523,8 @@
char * param = get_keyparam(v, MAP);
int major, minor;
char dev_path[PATH_SIZE];
- char *alias, *refwwid;
+ char *alias = NULL;
+ char *refwwid = NULL;
int rc, count = 0;
param = convert_dev(param, 0);
@@ -565,8 +566,10 @@
return 1;
}
rc = ev_add_map(dev_path, alias, vecs);
- FREE(alias);
- FREE(refwwid);
+ if (alias)
+ FREE(alias);
+ if (refwwid)
+ FREE(refwwid);
return rc;
}
@@ -577,7 +580,7 @@
char * param = get_keyparam(v, MAP);
int major, minor;
char dev_path[PATH_SIZE];
- char *alias;
+ char *alias = NULL;
int rc;
param = convert_dev(param, 0);
@@ -600,7 +603,8 @@
return 0;
}
rc = ev_remove_map(param, alias, minor, vecs);
- FREE(alias);
+ if (alias)
+ FREE(alias);
return rc;
}