This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: Consolidate out-of-memory error paths. Minor code cleanups.
There are couple of places in update_db() where we can get memory allocation failures. Consolidate such error handling in single place and make code more readable. Check for oom from call to g_strdup_printf() in update_db(). Allocate database directory and update file paths at the beginning of the update procedure, so oom conditions catched before we attempt to establish lock or create update dot file. Move code checking for valid file descriptor from update_end() up to the caller. Signed-off-by: Sergey Popovich <[email protected]>
- Loading branch information
Sergey Popovich
authored and
Serhii Popovych
committed
Jan 5, 2016
1 parent
fcbef7f
commit 705a2be
Showing
1 changed file
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters