Ticket #53 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

rrd_first_r leave file descriptor open on error

Reported by: TvE Owned by: oetiker
Priority: minor Milestone:
Component: misc Version: 1.2.15
Keywords: Cc:

Description

In rrd_first.c on line 71 the error return statement leaves the RRD file descriptor open. Lines 69-71 should be changed from:

    if((rraindex < 0) || (rraindex >= (int)rrd.stat_head->rra_cnt)) {
        rrd_set_error("invalid rraindex number");
        return(-1);
    }

to:

    if((rraindex < 0) || (rraindex >= (int)rrd.stat_head->rra_cnt)) {
        rrd_set_error("invalid rraindex number");
        rrd_free(&rrd);
        fclose(in_file);
        return(-1);
    }

Change History

Changed 4 years ago by oetiker

  • status changed from new to closed
  • resolution set to fixed

thanks, fixed in r880

Note: See TracTickets for help on using tickets.

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.