[PATCH] Make loadparm more common
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Apr 1 00:43:33 MDT 2014
On Tue, Apr 01, 2014 at 05:21:02PM +1300, Andrew Bartlett wrote:
> At this point, what I would like to see is these patches reviewed:
> http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=5fa1a3cd62e0dcefc5364f83046db025fc0e65b9
This has a talloc_zero(NULL,...). Would it be possible to
use talloc_tos() here?
> http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=909fb5a6c7df2e2cc7e48d5814eb2cff53ee6664
While in general a good direction, this one has the snippet
- SAFE_FREE(f->subfname);
- f->subfname = SMB_STRDUP(n2);
+ TALLOC_FREE(f->subfname);
+ f->subfname = talloc_strdup(f, n2);
TALLOC_FREE(n2);
SMB_STRDUP panics on failure, talloc_strdup does not. So we
need NULL checks in these scenarios. I haven't checked all
places where this is done.
> http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=5c9f5892c4e3304e2e3f11be0a41d087f9df6d9c
Obviously good. R-B me.
> http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=746cbfcd93c38e5bb66e892fa2ef0d0d11888703
Just for simplicity, can we make it such that the equivalent
piece of code in source3/param/loadparm.c looks exactly the
same? If we touch the code, we should unify the code lines
1:1.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list