Author: cazfi
Date: Mon Jan  4 14:01:52 2016
New Revision: 31345

URL: http://svn.gna.org/viewcvs/freeciv?rev=31345&view=rev
Log:
Fixed memory allocation problem in fallback IPv4 implementation.

See bug #24267

Modified:
    trunk/utility/netintf.c

Modified: trunk/utility/netintf.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/netintf.c?rev=31345&r1=31344&r2=31345&view=diff
==============================================================================
--- trunk/utility/netintf.c     (original)
+++ trunk/utility/netintf.c     Mon Jan  4 14:01:52 2016
@@ -418,7 +418,7 @@
   struct sockaddr_in *sock4;
   struct hostent *hp;
   struct fc_sockaddr_list *addrs = fc_sockaddr_list_new();
-  union fc_sockaddr *result = fc_malloc(sizeof(result));
+  union fc_sockaddr *result = fc_malloc(sizeof(*result));
 
   sock4 = &result->saddr_in4;
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to