Changeset 15899 in project for chicken


Ignore:
Timestamp:
09/15/09 10:47:15 (10 years ago)
Author:
kon
Message:

Added check for unsuccessful alloc of lf_list node. Rmvd attempt at free of NULL ptr..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/runtime.c

    r15869 r15899  
    18681868/* Register/unregister literal frame: */
    18691869
    1870 
    18711870static LF_LIST *
    18721871make_lf_list_node(C_word *lf, int count, C_PTABLE_ENTRY *ptable, C_char *name, void *handle)
    18731872{
    18741873  LF_LIST *node = (LF_LIST *)C_malloc(sizeof(LF_LIST));
     1874
     1875  if(NULL == node)
     1876    barf(C_OUT_OF_MEMORY_ERROR, "make_lf_list_node");
    18751877
    18761878  node->lf = lf;
     
    19411943void *C_register_lf2(C_word *lf, int count, C_PTABLE_ENTRY *ptable)
    19421944{
     1945  LF_LIST *np;
    19431946  LF_LIST *node = make_lf_list_node(lf, count, ptable, NULL, NULL);
    1944   LF_LIST *np;
    19451947  int status = 0;
    19461948 
     
    89078909      else {
    89088910        C_free(sname);
    8909         C_free(node);
    89108911      }
    89118912    }
    8912     else C_free(sname);
    89138913  }
    89148914
Note: See TracChangeset for help on using the changeset viewer.