]> sigrok.org Git - libserialport.git/blobdiff - linux.c
linux: freebsd: do check on proper pointer
[libserialport.git] / linux.c
diff --git a/linux.c b/linux.c
index 9016489fb16f95afcedc2db0c9d8d2c8feb5a1f3..f7dc8fda7febfc97ec21b0934750d672aad773fc 100644 (file)
--- a/linux.c
+++ b/linux.c
@@ -236,7 +236,7 @@ SP_PRIV enum sp_return list_ports(struct sp_port ***list)
                }
                DEBUG_FMT("Found port %s", name);
                *list = list_append(*list, name);
-               if (!list) {
+               if (!*list) {
                        SET_ERROR(ret, SP_ERR_MEM, "List append failed");
                        break;
                }