diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-09 13:38:31 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-09 13:39:27 -0500 |
commit | 59604f5e3c844ef040f62fe1655a92e1990c417e (patch) | |
tree | 4bb66292a13e4d3207ef2206a929e37c3325b1d5 | |
parent | b12ab572de5cd0c415a199f64c287df9289b24f2 (diff) | |
download | sssd2-sssd-1-6.tar.gz sssd2-sssd-1-6.tar.xz sssd2-sssd-1-6.zip |
Fix potential resource leak in backup_file.csssd-1-6
-rw-r--r-- | src/util/backup_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/backup_file.c b/src/util/backup_file.c index fb1604b9..ba776404 100644 --- a/src/util/backup_file.c +++ b/src/util/backup_file.c @@ -68,7 +68,7 @@ int backup_file(const char *src_file, int dbglvl) dst_fd = open(dst_file, O_CREAT|O_EXCL|O_WRONLY, 0600); ret = errno; - if (dst_fd > 0) break; + if (dst_fd >= 0) break; if (ret != EEXIST) { DEBUG(dbglvl, ("Error (%d [%s]) opening destination file %s\n", |