From e7fc37cf0f4bd2c0f25865fb07d1bff27b239130 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 19 Jun 2006 19:07:39 +0000 Subject: r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607 in net_rpc.c: 715 716 732 734 735 736 737 738 739 749 in net_rpc_audit.c: 754 755 756 in net_rpc_join.c: 757 in net_rpc_registry: 766 767 in net_rpc_samsync.c: 771 773 in net_sam.c: 797 798 Volker (This used to be commit 3df0bf7d6050fd7c9ace72487d4f74d92e30a584) --- source3/utils/net_rpc_registry.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/utils/net_rpc_registry.c') diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 33d5310698..10ba28e023 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -408,7 +408,10 @@ static int rpc_registry_dump( int argc, const char **argv ) /* get the root of the registry file */ - nk = regfio_rootkey( registry ); + if ((nk = regfio_rootkey( registry )) == NULL) { + d_fprintf(stderr, "Could not get rootkey\n"); + return 1; + } d_printf("[%s]\n", nk->keyname); dump_values( nk ); d_printf("\n"); @@ -455,7 +458,10 @@ static int rpc_registry_copy( int argc, const char **argv ) /* get the root of the registry file */ - nk = regfio_rootkey( infile ); + if ((nk = regfio_rootkey( infile )) == NULL) { + d_fprintf(stderr, "Could not get rootkey\n"); + goto out_close_infile; + } d_printf("RootKey: [%s]\n", nk->keyname); write_registry_tree( infile, nk, NULL, outfile, "" ); -- cgit