Author: vlendec
Date: 2006-06-15 10:12:29 +0000 (Thu, 15 Jun 2006)
New Revision: 16248

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16248

Log:
Fix Coverity ID 297
Modified:
   branches/SAMBA_3_0/source/smbd/chgpasswd.c
   trunk/source/smbd/chgpasswd.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/chgpasswd.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/chgpasswd.c  2006-06-15 10:06:09 UTC (rev 
16247)
+++ branches/SAMBA_3_0/source/smbd/chgpasswd.c  2006-06-15 10:12:29 UTC (rev 
16248)
@@ -579,6 +579,11 @@
        uint32 acct_ctrl;
        const uint8 *lanman_pw;
        BOOL ret;
+
+       if ( !(sampass = samu_new(NULL)) ) {
+               DEBUG(0, ("samu_new() failed!\n"));
+               return False;
+       }
        
        become_root();
        ret = pdb_getsampwnam(sampass, user);

Modified: trunk/source/smbd/chgpasswd.c
===================================================================
--- trunk/source/smbd/chgpasswd.c       2006-06-15 10:06:09 UTC (rev 16247)
+++ trunk/source/smbd/chgpasswd.c       2006-06-15 10:12:29 UTC (rev 16248)
@@ -579,6 +579,11 @@
        uint32 acct_ctrl;
        const uint8 *lanman_pw;
        BOOL ret;
+
+       if ( !(sampass = samu_new(NULL)) ) {
+               DEBUG(0, ("samu_new() failed!\n"));
+               return False;
+       }
        
        become_root();
        ret = pdb_getsampwnam(sampass, user);

Reply via email to