From 2c5fabbc0b492cb5456e670ce9eb2352a11d5e3b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> Date: Sun, 23 Jan 2005 20:38:44 +0000 Subject: update git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/int_pet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/char/int_pet.c') diff --git a/src/char/int_pet.c b/src/char/int_pet.c index c08c4ccf3..0dd334514 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -88,7 +88,7 @@ int inter_pet_init() if( (fp=fopen(pet_txt,"r"))==NULL ) return 1; while(fgets(line,sizeof(line),fp)){ - p=calloc(sizeof(struct s_pet), 1); + p=aCalloc(sizeof(struct s_pet), 1); if(p==NULL){ printf("int_pet: out of memory!\n"); exit(0); @@ -100,7 +100,7 @@ int inter_pet_init() numdb_insert(pet_db,p->pet_id,p); }else{ printf("int_pet: broken data [%s] line %d\n",pet_txt,c); - free(p); + aFree(p); } c++; } @@ -210,7 +210,7 @@ int mapif_create_pet(int fd,int account_id,int char_id,short pet_class,short pet short pet_equip,short intimate,short hungry,char rename_flag,char incuvate,char *pet_name) { struct s_pet *p; - p=malloc(sizeof(struct s_pet)); + p=aMalloc(sizeof(struct s_pet)); if(p==NULL){ printf("int_pet: out of memory !\n"); mapif_pet_created(fd,account_id,NULL); @@ -282,7 +282,7 @@ int mapif_save_pet(int fd,int account_id,struct s_pet *data) pet_id = data->pet_id; p=numdb_search(pet_db,pet_id); if(p == NULL) { - p=malloc(sizeof(struct s_pet)); + p=aMalloc(sizeof(struct s_pet)); if(p==NULL){ printf("int_pet: out of memory !\n"); mapif_save_pet_ack(fd,account_id,1); -- cgit v1.2.3-60-g2f50