r13350: Implement rpccli_samr_set_domain_info. Weird that it was not around :-)
[kai/samba.git] / source3 / rpc_parse / parse_samr.c
index 7cbaa4e3c993216bcff833f2bbe8499c60417c68..87bfcebe2648efdffee2b436de4058ae842d1fa2 100644 (file)
@@ -7629,8 +7629,10 @@ BOOL samr_io_q_set_domain_info(const char *desc, SAMR_Q_SET_DOMAIN_INFO *q_u,
        if(!prs_align(ps))
                return False;
 
-       if ((q_u->ctr = PRS_ALLOC_MEM(ps, SAM_UNK_CTR, 1)) == NULL)
-               return False;
+       if (UNMARSHALLING(ps)) {
+               if ((q_u->ctr = PRS_ALLOC_MEM(ps, SAM_UNK_CTR, 1)) == NULL)
+                       return False;
+       }
        
        switch (q_u->switch_value) {