Changeset 869 for releases

Show
Ignore:
Timestamp:
04/25/06 21:54:07 (3 years ago)
Author:
aj
Message:

memory leak in error handling.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • releases/openct-0.6.7/src/ifd/ifdproxy.c

    r850 r869  
    124124 
    125125        if (opt_chroot) { 
    126                 if (chroot(opt_chroot) < 0 || chdir("/") < 0) { 
     126                if (chdir("/") < 0 || chroot(opt_chroot) < 0) { 
    127127                        ct_error("chroot(%s) failed: %m", opt_chroot); 
    128128                        exit(1); 
     
    258258                ct_error("Failed to list exported devices: %s", 
    259259                         ct_strerror(rc)); 
     260                ria_free(clnt); 
    260261                return 1; 
    261262        } 
     
    264265        if (count == 0) { 
    265266                printf("No exported devices\n"); 
     267                ria_free(clnt); 
    266268                return 0; 
    267269        } 
     
    273275        } 
    274276 
     277        ria_free(clnt); 
    275278        return 0; 
    276279}