From 6392641545bb9ea1ff908f29da3184dde6a0139b Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 2 May 2015 21:18:36 +0200 Subject: [PATCH] sp_list_ports(): Actually set list_ptr NULL as documented. --- serialport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serialport.c b/serialport.c index f2d2edc..e4f02fc 100644 --- a/serialport.c +++ b/serialport.c @@ -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