Navigation


Changeset 967:bbc08d58325a in freeDiameter


Ignore:
Timestamp:
Mar 10, 2013, 5:57:57 PM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Parents:
964:992ef1167344 (diff), 937:6e7437162f26 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

merge

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.