comparison lib/sslcommon.c @ 942:85cf59eafce2

2008-01-24 Brian Masney <masneyb@gftp.org> * lib/config_file.c lib/sshv2.c lib/sslcommon.c lib/rfc2068.c - s/g_malloc/g_malloc0/
author masneyb
date Thu, 24 Jan 2008 23:28:30 +0000
parents 1808cebed602
children 9a6571938f89
comparison
equal deleted inserted replaced
941:19b6d55e2646 942:85cf59eafce2
235 static struct CRYPTO_dynlock_value * 235 static struct CRYPTO_dynlock_value *
236 _gftp_ssl_create_dyn_mutex (const char *file, int line) 236 _gftp_ssl_create_dyn_mutex (const char *file, int line)
237 { 237 {
238 struct CRYPTO_dynlock_value *value; 238 struct CRYPTO_dynlock_value *value;
239 239
240 value = g_malloc (sizeof (*value)); 240 value = g_malloc0 (sizeof (*value));
241 value->mutex = g_mutex_new (); 241 value->mutex = g_mutex_new ();
242 return (value); 242 return (value);
243 } 243 }
244 244
245 245
271 #if G_MAJOR_VERSION == 1 271 #if G_MAJOR_VERSION == 1
272 /* Thread setup isn't supported in glib 1.2 yet */ 272 /* Thread setup isn't supported in glib 1.2 yet */
273 return; 273 return;
274 #endif 274 #endif
275 275
276 gftp_ssl_mutexes = g_malloc (CRYPTO_num_locks( ) * sizeof (*gftp_ssl_mutexes)); 276 gftp_ssl_mutexes = g_malloc0 (CRYPTO_num_locks( ) * sizeof (*gftp_ssl_mutexes));
277 277
278 for (i = 0; i < CRYPTO_num_locks ( ); i++) 278 for (i = 0; i < CRYPTO_num_locks ( ); i++)
279 gftp_ssl_mutexes[i] = g_mutex_new (); 279 gftp_ssl_mutexes[i] = g_mutex_new ();
280 280
281 CRYPTO_set_id_callback (_gftp_ssl_id_function); 281 CRYPTO_set_id_callback (_gftp_ssl_id_function);