> Many places in dtc use strdup(), but none of them actually check the > return value to see if the implied allocation succeeded. This is a > potential bug, which we fix in the patch below by replacing strdup() > with an xstrdup() which in analogy to xmalloc() will quit with a fatal > error if the allocation fails. > > xstrdup() is defined in srcpos.c, because that's available to both dtc > itself and the conversion program which also uses it. While we're at > it, we add standard double-include protection to srcpos.h which was > missing it. > > Signed-off-by: David Gibson <[EMAIL PROTECTED]>
This was applied with a minor change, placing the new function in the file util.h and util.c instead. New patch posted. Thanks, jdl _______________________________________________ devicetree-discuss mailing list [email protected] https://ozlabs.org/mailman/listinfo/devicetree-discuss
