Fossil

Check-in [22cc813f8e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixed a minor memleak in update.c:revert_cmd()
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 22cc813f8e65b827d5b2ef63f2b1932e0a0bbb1b
User & Date: stephan 2008-02-02 18:44:49.000
Context
2008-02-02
18:51
corrected two 'var may be used uninitialized' warnings check-in: 01d3c33874 user: stephan tags: trunk
18:44
fixed a minor memleak in update.c:revert_cmd() check-in: 22cc813f8e user: stephan tags: trunk
07:33
Merged with mainline. check-in: dbdc160161 user: aku tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/update.c.
312
313
314
315
316
317
318

319
320
321
322
323
324
325
  if( access(zFile, 0) ) yesRevert = 1;  
  if( yesRevert==0 ){
    char *prompt = mprintf("revert file %B? this will"
                           " destroy local changes [y/N]? ",
                           &fname);
    blob_zero(&ans);
    prompt_user(prompt, &ans);

    if( blob_str(&ans)[0]=='y' ){
      yesRevert = 1;
    }
  }

  if( yesRevert==1 && zRevision!=0 ){
    historical_version_of_file(zRevision, zFile, &record);







>







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
  if( access(zFile, 0) ) yesRevert = 1;  
  if( yesRevert==0 ){
    char *prompt = mprintf("revert file %B? this will"
                           " destroy local changes [y/N]? ",
                           &fname);
    blob_zero(&ans);
    prompt_user(prompt, &ans);
    free( prompt );
    if( blob_str(&ans)[0]=='y' ){
      yesRevert = 1;
    }
  }

  if( yesRevert==1 && zRevision!=0 ){
    historical_version_of_file(zRevision, zFile, &record);