diff mbox

[11/42] Checker name is not displayed on failure

Message ID 1357653259-62650-12-git-send-email-hare@suse.de (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Hannes Reinecke Jan. 8, 2013, 1:53 p.m. UTC
If add_checker() isn't able to locate the checker
it won't display the name in free_checker().

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/prio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/libmultipath/prio.c b/libmultipath/prio.c
index cf97fad..8e6b93e 100644
--- a/libmultipath/prio.c
+++ b/libmultipath/prio.c
@@ -86,6 +86,7 @@  struct prio * add_prio (char * name)
 	p = alloc_prio();
 	if (!p)
 		return NULL;
+	snprintf(p->name, PRIO_NAME_LEN, "%s", name);
 	snprintf(libname, LIB_PRIO_NAMELEN, "%s/libprio%s.so",
 		 conf->multipath_dir, name);
 	if (stat(libname,&stbuf) < 0) {
@@ -107,7 +108,6 @@  struct prio * add_prio (char * name)
 		condlog(0, "A dynamic linking error occurred: (%s)", errstr);
 	if (!p->getprio)
 		goto out;
-	snprintf(p->name, PRIO_NAME_LEN, "%s", name);
 	list_add(&p->node, &prioritizers);
 	return p;
 out: