Changeset 1042 for trunk/dll/mle.c


Ignore:
Timestamp:
Jul 7, 2008, 1:34:34 AM (17 years ago)
Author:
Gregg Young
Message:

Rework LoadThread to stale memory and other oddities;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mle.c

    r1040 r1042  
    1919  17 Dec 07 GKY Make WPURLDEFAULTSETTINGS the fall back for ftp/httprun
    2020  29 Feb 08 GKY Refactor global command line variables to notebook.h
    21   29 Feb 08 GKY Use xfree where appropriate
    2221  22 Jun 08 GKY Fixed memory buffer access after it had been freed
     22  06 Jul 08 GKY Rework LoadThread logic with Steven's help
    2323
    2424***********************************************************************/
     
    771771  DosError(FERR_DISABLEHARDERR);
    772772
     773# ifdef FORTIFY
     774  Fortify_EnterScope();
     775# endif
     776
    773777  bkg = (BKGLOAD *) arg;
    774778  if (bkg) {
     
    779783        WinCancelShutdown(thmq, TRUE);
    780784        IncrThreadUsage();
    781 # ifdef FORTIFY
    782   Fortify_EnterScope();
    783 # endif
    784785        priority_normal();
    785786        if (bkg->hex == 1)
     
    802803      DecrThreadUsage();
    803804      WinTerminate(thab);
    804       free(bkg);
    805       bkg = NULL;
     805    }
     806    else {
     807      // fixme to be gone? - can not PostMsg without HAB
     808      PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID);
     809    }
     810    free(bkg);
     811  } // if bkg
    806812# ifdef FORTIFY
    807813  Fortify_LeaveScope();
    808814# endif
    809       _endthread();
    810     }
    811     // fixme to be gone?
    812     else {
    813       PostMsg(bkg->hwndReport, bkg->msg, MPVOID, MPVOID);
    814       free(bkg);
    815       bkg = NULL;
    816 # ifdef FORTIFY
    817   Fortify_LeaveScope();
    818 # endif
    819     }
    820   }
     815  _endthread();
    821816}
    822817
Note: See TracChangeset for help on using the changeset viewer.