Changeset 626


Ignore:
Timestamp:
Apr 10, 2015, 11:19:43 PM (9 years ago)
Author:
djay
Message:

Remove memory leak in parser_request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/request_parser.c

    r625 r626  
    158158    if (inputs_as_text == NULL)
    159159      {
     160        free(cursor_input);
    160161        return errorException (*main_conf, _("Unable to allocate memory."),
    161162                               "InternalError", NULL);
     
    168169        if (inputs_as_text[i] == NULL)
    169170          {
     171            free(cursor_input);
    170172            return errorException (*main_conf, _("Unable to allocate memory."),
    171173                                   "InternalError", NULL);
     
    203205                if (tmpmaps == NULL)
    204206                  {
     207                    free(cursor_input);
    205208                    return errorException (*main_conf,
    206209                                           _("Unable to allocate memory."),
     
    259262                                 ("Unable to find a valid protocol to download the remote file %s"),
    260263                                 tmpv1 + 1);
     264                        free(cursor_input);
    261265                        return errorException (*main_conf, emsg, "InternalError", NULL);
    262266                      }
     
    266270                          (&*main_conf, &tmpmaps->content, hInternet, tmpx2) < 0)
    267271                        {
     272                          free(cursor_input);
    268273                          return errorException (*main_conf, "Unable to fetch any ressource", "InternalError", NULL);
    269                           }
     274                        }
    270275                      }
    271276                    free (tmpx2);
     
    290295                             elem) < 0)
    291296                          {
     297                            free(cursor_input);
    292298                            return errorException (*main_conf, "Unable to append maps", "InternalError", NULL);
    293299                          }
     
    304310      }
    305311    free (inputs_as_text);
     312    free(cursor_input);
    306313  }
    307314  return 1;
     
    339346      if (outputs_as_text == NULL)
    340347        {
     348          free(cursor_output);
    341349          return errorException (*main_conf, _("Unable to allocate memory"),
    342350                                 "InternalError", NULL);
     
    349357          if (outputs_as_text[i] == NULL)
    350358            {
     359              free(cursor_output);
    351360              return errorException (*main_conf, _("Unable to allocate memory"),
    352361                                     "InternalError", NULL);
     
    373382                      if (tmp_output == NULL)
    374383                        {
     384                          free(cursor_output);
    375385                          return errorException (*main_conf,
    376386                                                 _
     
    413423        }
    414424      free (outputs_as_text);
     425      free(cursor_output);
    415426    }
    416427  return 1;
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