]> sigrok.org Git - libserialport.git/commitdiff
sp_list_ports(): Actually set list_ptr NULL as documented.
authorUwe Hermann <redacted>
Sat, 2 May 2015 19:18:36 +0000 (21:18 +0200)
committerUwe Hermann <redacted>
Wed, 6 May 2015 15:06:06 +0000 (17:06 +0200)
serialport.c

index f2d2edcd3b56349feb85e4116defe25f64201ceb..e4f02fc58dde6d1cde27f5863eff49dae0f326e2 100644 (file)
@@ -334,6 +334,8 @@ SP_API enum sp_return sp_list_ports(struct sp_port ***list_ptr)
        if (!list_ptr)
                RETURN_ERROR(SP_ERR_ARG, "Null result pointer");
 
+       *list_ptr = NULL;
+
 #ifdef NO_ENUMERATION
        RETURN_ERROR(SP_ERR_SUPP, "Enumeration not supported on this platform");
 #else