best_port = NULL is valid parameter value for resolve_ca_name(), so
check this.

Signed-off-by: Sasha Khapyorsky <[EMAIL PROTECTED]>
---
 libibumad/src/umad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index 1012695..5b7b83e 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -303,7 +303,7 @@ resolve_ca_name(char *ca_name, int *best_port)
        for (caidx = 0; caidx < n; caidx++) {
                TRACE("checking ca '%s'", names[caidx]);
 
-               port = *best_port;
+               port = best_port ? *best_port : 0;
                if ((port_type = resolve_ca_port(names[caidx], &port)) < 0)
                        continue;
 
-- 
1.5.3.rc2.29.gc4640f

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to