In C, a typical strategy for implementing error handling code is to follow each operation that may encounter an error by a conditional that checks for an error result and, if one is found, performs the appropriate cleanup operations before returning from the function. This basic strategy, however, is itself error-prone, as it is easy to overlook some cleanup operations that are required, and to forget to update some existing error handling code when the function is extended with new operations that need to be undone in an error case. Furthermore, there may be substantial code duplication, as the same error handling code may be needed at many places within a function definition. One style of programming, goto-based strategy, that can somewhat alleviate these difficulties. To improve the structure of error handling code in the system software, we define an algorithm to transform error handling code implemented according to the basic strategy so that it follows the goto-based strategy. Even when error handling code is structured, the management of the releasing of allocated resources remains a continual problem in ensuring the robustness of systems code. In this thesis, we propose a microscopic resource-release omission fault finding algorithm, based on a mostly intraprocedural, flow and path-sensitive analysis, that targets and exploits the properties of error-handling code. Our algorithm is resistant to false positives in the set of resource acquisition and release operations, resulting in a low rate of false positives in the fault reports, and is highly scalable.