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:31 -0500 |
commit | a601c01a3bae887b25b6cc8c6dc91ed694f497eb (patch) | |
tree | b86298214236574e562d36eb6f96fff3f84100a1 | |
parent | 4f079205b47a115d7439f07f3766fc170bde0e73 (diff) | |
download | sssd-a601c01a3bae887b25b6cc8c6dc91ed694f497eb.tar.gz sssd-a601c01a3bae887b25b6cc8c6dc91ed694f497eb.tar.xz sssd-a601c01a3bae887b25b6cc8c6dc91ed694f497eb.zip |
Fix potential resource leak in backup_file.c
-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 fb1604b9e..ba7764049 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", |