Selaa lähdekoodia

Dangling pointer~

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6430 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance 19 vuotta sitten
vanhempi
commit
23a13eb1fc
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/map/chrif.c

+ 1 - 1
src/map/chrif.c

@@ -511,7 +511,7 @@ void chrif_authok(int fd) {
 		return;
 	}
 	// Awaiting for client to connect.
-	auth_data = (struct auth_node *)aMalloc(sizeof(struct auth_node));
+	auth_data = (struct auth_node *)aCalloc(1,sizeof(struct auth_node));
 	auth_data->char_dat = (struct mmo_charstatus *) aCalloc(1,sizeof(struct mmo_charstatus));
 
 	auth_data->account_id=RFIFOL(fd, 4);