Navigation


Changes in / [964:992ef1167344:967:bbc08d58325a] in freeDiameter


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/fdd.y

    r964 r967  
    323323                                                { yyerror (&yylloc, conf, "Not enough memory"); YYERROR; } );
    324324                                        sprintf(fname, DEFAULT_EXTENSIONS_PATH "/%s", bkp);
    325                                         free(bkp);
    326325                                        fd = fopen(fname, "r");
    327                                 }
    328                                 if (fd == NULL) {
    329                                         int ret = errno;
    330                                         TRACE_DEBUG_ERROR("WARNING: Unable to open extension file %s for reading: %s\nLD_LIBRARY_PATH will be used.\n", fname, strerror(ret));
    331                                 } else {
     326                                        if (fd == NULL) {
     327                                                free(fname);
     328                                                fname = bkp;
     329                                        } else {
     330                                                free(bkp);
     331                                        }
     332                                }
     333                                if (fd != NULL) {
    332334                                        fclose(fd);
    333                                 }
     335                                } /* otherwise, LD_LIBRARY_PATH will be tested by dl_open.
     336                                This should not give any security issue, otherwise we can add an "else fail" here. */
    334337                               
    335338                                /* Try and open the configuration file (optional) */
Note: See TracChangeset for help on using the changeset viewer.