diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-06-20 09:16:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:18:52 -0500 |
commit | d6547d12b1c9f9454876665a5bdb010f46b9f5ff (patch) | |
tree | 27ad4f84795bb413bbc317e50994224cbcc5d137 /source/utils | |
parent | d357f8b33594472ffa78d0a112accccc2a8b1fe7 (diff) | |
download | samba-d6547d12b1c9f9454876665a5bdb010f46b9f5ff.tar.gz samba-d6547d12b1c9f9454876665a5bdb010f46b9f5ff.tar.xz samba-d6547d12b1c9f9454876665a5bdb010f46b9f5ff.zip |
r16409: Fix Klocwork ID's.
1177
In reg_perfcount.c: 1200 1202 1203 1204
In regfio.c: 1243 1245 1246 1247 1251
Jerry, the reg_perfcount and regfio.c ones, can you take a look please? This
is really your code, and I'm not sure I did the right thing to return an
error.
smbcacls.c: 1377
srv_eventlog_nt.c: 1415 1416 1417
srv_lsa_nt.c: 1420 1421
srv_netlog_nt.c: 1429
srv_samr_nt: 1458 1459 1460
Volker
Volker
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/profiles.c | 5 | ||||
-rw-r--r-- | source/utils/smbcacls.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source/utils/profiles.c b/source/utils/profiles.c index 9629dffaea2..d40a2deea3b 100644 --- a/source/utils/profiles.c +++ b/source/utils/profiles.c @@ -213,7 +213,10 @@ int main( int argc, char *argv[] ) /* actually do the update now */ - nk = regfio_rootkey( infile ); + if ((nk = regfio_rootkey( infile )) == NULL) { + fprintf(stderr, "Could not get rootkey\n"); + exit(3); + } if ( !copy_registry_tree( infile, nk, NULL, outfile, "" ) ) { fprintf(stderr, "Failed to write updated registry file!\n"); diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 1c34cd32a66..b31fd95f7ab 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -360,11 +360,12 @@ static BOOL add_ace(SEC_ACL **the_acl, SEC_ACE *ace) SEC_ACL *new_ace; SEC_ACE *aces; if (! *the_acl) { - (*the_acl) = make_sec_acl(ctx, 3, 1, ace); - return True; + return (((*the_acl) = make_sec_acl(ctx, 3, 1, ace)) != NULL); } - aces = SMB_CALLOC_ARRAY(SEC_ACE, 1+(*the_acl)->num_aces); + if (!(aces = SMB_CALLOC_ARRAY(SEC_ACE, 1+(*the_acl)->num_aces))) { + return False; + } memcpy(aces, (*the_acl)->ace, (*the_acl)->num_aces * sizeof(SEC_ACE)); memcpy(aces+(*the_acl)->num_aces, ace, sizeof(SEC_ACE)); new_ace = make_sec_acl(ctx,(*the_acl)->revision,1+(*the_acl)->num_aces, aces); |