Subject: Re: libssh2 master e48907e... avoid a free(NULL)

Re: libssh2 master e48907e... avoid a free(NULL)

From: Mikhail Gusarov <dottedmag_at_dottedmag.net>
Date: Sun, 10 Jan 2010 05:02:04 +0600

Twas brillig at 23:00:49 09.01.2010 UTC+00 when libssh2_at_git.stuge.se did gyre and gimble:

 l> - LIBSSH2_FREE(session, pubkeydata);
 l> + if(pubkeydata)
 l> + LIBSSH2_FREE(session, pubkeydata);

Why it's needed?

From man free(3): "If ptr is NULL, no operation is performed."

-- 
  http://fossarchy.blogspot.com/

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2010-01-10