Ignore:
Timestamp:
Aug 29, 2017, 10:52:39 AM (7 years ago)
Author:
djay
Message:

Fix various memory leaks and enhance the callback support. Add the prohibited keyword to the callback section to avoid calling callback for such services.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/service.c

    r839 r850  
    417417    if(tmp->format!=NULL)
    418418      free(tmp->format);
     419    freeElements(&tmp->child);
    419420    if(tmp->child!=NULL){
    420       freeElements(&tmp->child);
    421421      free(tmp->child);
    422422    }
     
    453453    if(tmp->metadata!=NULL)
    454454      free(tmp->metadata);
     455    freeMap(&tmp->additional_parameters);
     456    if(tmp->additional_parameters!=NULL)
     457      free(tmp->additional_parameters);
    455458    freeElements(&tmp->inputs);
    456459    if(tmp->inputs!=NULL)
     
    11601163  elements* cursor=e;
    11611164  elements* tmp=NULL;
    1162   if(cursor!=NULL && e->name!=NULL){
     1165  if(cursor!=NULL && cursor->name!=NULL){
    11631166#ifdef DEBUG
    11641167    fprintf(stderr,">> %s %i\n",__FILE__,__LINE__);
     
    11671170#endif
    11681171    tmp=(elements*)malloc(ELEMENTS_SIZE);
    1169     tmp->name=zStrdup(e->name);
     1172    tmp->name=zStrdup(cursor->name);
    11701173    tmp->content=NULL;
    11711174    addMapToMap(&tmp->content,e->content);
     
    12281231  elements* tmp=e;
    12291232  if(*m==NULL){
    1230     *m=dupElements(tmp);
     1233    (*m)=dupElements(tmp);
    12311234  }else{
    12321235    addToElements(&(*m)->next,tmp);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png