]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
report and abort on getcwd() failures
authorMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 02:46:26 +0000 (02:46 +0000)
committerMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 02:46:26 +0000 (02:46 +0000)
bin/tests/dst/dst_test.c

index 8347a7d124a40d5ecb6fbc1e8753e61a17e7aa41..2ff73c4ffbc9c82b20570b66570497d4662f59d8 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dst_test.c,v 1.43 2007/06/19 23:47:00 tbox Exp $ */
+/* $Id: dst_test.c,v 1.43.332.1 2009/03/02 02:46:26 marka Exp $ */
 
 #include <config.h>
 
@@ -245,7 +245,10 @@ main(void) {
        current = isc_mem_get(mctx, 256);
        if (current == NULL)
                return (1);
-       getcwd(current, 256);
+       if (getcwd(current, 256) == NULL) {
+               perror("getcwd");
+               return (1);
+       }
 
        dns_result_register();