[Olsr-cvs] olsrd-current/src/cfgparser olsrd_conf.c, 1.46.2.1, 1.46.2.2
Andreas T�nnesen
(spam-protected)
Thu Sep 14 10:05:10 CEST 2006
Update of /cvsroot/olsrd/olsrd-current/src/cfgparser
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv469/src/cfgparser
Modified Files:
Tag: olsrd_04
olsrd_conf.c
Log Message:
Check for NULL return for malloc
Index: olsrd_conf.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v
retrieving revision 1.46.2.1
retrieving revision 1.46.2.2
diff -C2 -d -r1.46.2.1 -r1.46.2.2
*** olsrd_conf.c 17 Apr 2006 18:25:29 -0000 1.46.2.1
--- olsrd_conf.c 14 Sep 2006 08:05:07 -0000 1.46.2.2
***************
*** 111,115 ****
fprintf(stderr, "Out of memory %s\n", __func__);
return NULL;
! }
set_default_cnf(cnf);
--- 111,115 ----
fprintf(stderr, "Out of memory %s\n", __func__);
return NULL;
! }
set_default_cnf(cnf);
***************
*** 125,129 ****
free(cnf);
return NULL;
! }
current_line = 1;
--- 125,129 ----
free(cnf);
return NULL;
! }
current_line = 1;
***************
*** 427,431 ****
fprintf(stderr, "Out of memory %s\n", __func__);
return NULL;
! }
set_default_cnf(cnf);
--- 427,431 ----
fprintf(stderr, "Out of memory %s\n", __func__);
return NULL;
! }
set_default_cnf(cnf);
***************
*** 478,482 ****
struct if_config_options *io = malloc(sizeof(struct if_config_options));
struct in6_addr in6;
!
memset(io, 0, sizeof(struct if_config_options));
--- 478,488 ----
struct if_config_options *io = malloc(sizeof(struct if_config_options));
struct in6_addr in6;
!
! if(io == NULL)
! {
! fprintf(stderr, "Out of memory %s\n", __func__);
! return NULL;
! }
!
memset(io, 0, sizeof(struct if_config_options));
More information about the Olsr-cvs
mailing list