Commit graph

645 commits

Author SHA1 Message Date
Heinrich Schuchardt
0931cea3ba dtc: fdtdump: check fdt if not in scanning mode
Running fdtdump without scan mode for an invalid file often
results in a segmentation fault because the fdt header is
not checked.

With the patch the header is checked both in scanning as
well as in non-scanning mode.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[dwg: Removed unnecessary inline, changed type from int to bool]
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-27 09:44:17 +11:00
Gabriel Smith
f88865469b dtc: Fix memory leak in character literal parsing
The data struct used for parsing character literals was never freed
resulting in a few bytes leaked for every character.

Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-12 10:30:51 +11:00
David Gibson
00fbb8696b Rename boot_info
struct boot_info is named that for historical reasons, and isn't
particularly meaningful.  Essentially it contains all the information -
in "live" form from a single dts or dtb file.  As we move towards support
for dynamic dt overlays, that name will become increasingly bad.

So, in preparation, rename it to dt_info.  At the same time rename the
'the_boot_info' global to 'parser_output' since that's its actual purpose.
Unfortunately we do need the global unless we switch to bison's re-entrant
parser extensions, which would introduce its own complications.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:30:43 +11:00
David Gibson
1ef86ad2c2 dtc: Clean up /dts-v1/ and /plugin/ handling in grammar
First remove the non-terminal name 'versioninfo' - /plugin/ doesn't really
indicate a "version" per se, and version could be confused with the dtb
output version.

Second allow the /dts-v1/; /plugin/; sequence to be repeated, for easier
use of include files - but ensure that all copies match, so you can't
include a file declaring /plugin/ in one that doesn't, or vice versa.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:23:23 +11:00
David Gibson
e3c769aa9c dtc: Don't always generate __symbols__ for plugins
At the moment we generate a __symbols__ node if -@ is specified OR if the
dts has the /plugin/ tag.  That difference in behaviour from handling base
trees is unnecessary and slightly confusing.  It also means it's impossible
to create a plugin without symbols.  Since symbols in a plugin are only
useful in the case of stacked plugins - and libfdt doesn't even support
merging plugin symbols as part of overlay application yet - that's a thing
that might be useful.

So make __symbols__ generation depend only on -@.  We also remove remove
the testcases that checked explicitly for this not very useful behaviour.
Instead we don't use -@ for our basic overlay testcase, and check that
symbols are not generated.

At some point in the future we should add support for symbol merging to
libfdt and add testcases for stacked overlay application.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:39 +11:00
David Gibson
c96cb3c016 tests: Don't use -@ on plugin de/recompile tests
Using -@ again here obscures what's going on, because at the end we can't
know which run actually generated the symbols node.  We should just
generate the symbols on the first run and leave it at that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:39 +11:00
David Gibson
66381538ce tests: Remove "suppression of fixups" tests
I think these were for an additional command line option which got dropped
during development.  At this point all they're testing is that fixups don't
get generated for a non /plugin/ tree, which is already tested with one of
the simpler cases previously.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:39 +11:00
David Gibson
ba765b273f tests: Clarify dtc overlay tests
This changes the names of the testfiles for a number of the testcases of
the dtc overlay generation functionality to make them shorter and a bit
cleaerer what's going on.  In addition we move some of the check_path
sanity checks closer to the dtc commands they verify.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:37 +11:00
David Gibson
6ea8cd944f tests: More thorough tests of libfdt overlay application without dtc
At the moment we have some rudimentary tests of the fdt_overlay_apply()
function which don't rely on overlay generation support in dtc.  This is
done by avoiding any external references in the sample overlay, in
particularly using the 'target-path' syntax instead of 'target' to avoid
needing external references in the fragment targets.  Thus this test case
doesn't exercise libfdt's processing of the __fixups__ node at all.

We do test that somewhat in combination with dtc's overlay support.
However, in the interests of being able to quickly determine which side a
bug is on, it would be nice to exercise this without requiring the dtc
support.

This adds testcases to do so, by making some examples with manually
constructed __symbols__ and __fixups__ nodes.  In addition we rename some
of the test data files and add some extra check_path tests to make it a bit
clearer what's going on here.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:35 +11:00
David Gibson
7d8ef6e1db tests: Correct fdt handling of overlays without fixups and base trees without symbols
The fdt_overlay_apply() function purports to support the edge cases where
an overlay has no fixups to be applied, or a base tree which has no
symbols (the latter can only work if the former is also true).  However it
gets it wrong in a couple of small ways:

  * In the no fixups case, it doesn't fail immediately, but will attempt
    fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node
    offset, which will fail.  Instead it should succeed immediately, since
    there's nothing to do.
  * In the case of no symbols, it again doesn't fail immediately.  However
    if there is an actual fixup it will fail with an unexpected error,
    because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to
    look up the symbols.  We should instead return -FDT_ERR_NOTFOUND
    directly.

Both of these errors lead to the code returning misleading error codes in
failing cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:29 +11:00
David Gibson
b4dc0ed8b1 tests: Fix double expansion bugs in test code
Two test programs - check_path and overlay - define a CHECK() helper macro
in such a way that in the case of an error it will re-execute the checked
code fragment, instead of using the return value from the initial call.

This can lead to misreporting errors, because the code may fail in a
different way the second time around due to changes made during the first
failing call.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:23 +11:00
David Gibson
3ea879dc0c tests: Split overlay tests into those with do/don't exercise dtc plugin generation
The various tests for overlay/plugin support are currently lumped together
in the overlay_tests shell function, which is executed by libfdt_tests.

However, this includes both tests designed primarily to exercise libfdt's
overlay application, and tests designed to exercise dtc's overlay
generation.  Split these up for improved clarity.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:18 +11:00
David Gibson
47b4d66a2f tests: Test auto-alias generation on base tree, not overlay
The current testcases for the -A "auto alias generation" option operate on
a "plugin" tree.  Although not technically wrong, this is an odd approach,
since a plugin will almost certainly need the __symbols__ and/or __fixups__
syntax instead of aliases.  On the other hand -A may be useful simply for
generating aliases on a tree which is not using the overlay / plugin
mechanism at all.

Therefore change the tests to operate on a base tree example instead of a
plugin.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:14 +11:00
David Gibson
72e1ad8115 tests: Make overlay/plugin tests unconditional
When overlay apply supprt was added to libfdt the testcases included some
which could only be executed with the (then) out of tree dtc with overlay
output support.  So, the test script automatically skipped those tests if
it wasn't available.

Now that the overlay support is merged into dtc mainline there's no reason
to keep this logic.  Instead run all the overlay tests unconditionally.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 16:13:11 +11:00
Pantelis Antoniou
e7b3c3b595 tests: Add overlay tests
Add a number of tests for dynamic objects/overlays.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 13:26:39 +11:00
Pantelis Antoniou
9637e3f772 tests: Add check_path test
Add a test that checks for existence or not of a node.
It is useful for testing the various cases when generating
symbols and fixups for dynamic device tree objects.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 13:26:39 +11:00
Pantelis Antoniou
20f29d8d41 dtc: Plugin and fixup support
This patch enable the generation of symbols & local fixup information
for trees compiled with the -@ (--symbols) option.

Using this patch labels in the tree and their users emit information
in __symbols__ and __local_fixups__ nodes.

The __fixups__ node make possible the dynamic resolution of phandle
references which are present in the plugin tree but lie in the
tree that are applying the overlay against.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 13:26:39 +11:00
Pantelis Antoniou
a2c92cac53 dtc: Document the dynamic plugin internals
Provides the document explaining the internal mechanics of
plugins and options.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-12-09 13:26:39 +11:00
Pantelis Antoniou
8f70ac3980 checks: Pass boot_info instead of root node
As preparation for overlay support we need to pass the boot info
parameter instead of the root node to each check method.

The root node can be retrieved by accessing boot info's dt member.

No other functional changes are made.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-11-28 14:51:50 +11:00
Benjamin Fair
ea10f95387 libfdt: add missing errors to fdt_strerror()
Some error values were missing from the table which meant that they could
not be translated by fdt_strerror().

Signed-off-by: Benjamin Fair <b-fair@ti.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-11-04 07:17:20 +11:00
Masahiro Yamada
daa75e8fa5 libfdt: fix fdt_stringlist_search()
If fdt_getprop() fails, negative error code should be returned.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-17 20:56:58 +11:00
Masahiro Yamada
e28eff5b78 libfdt: fix fdt_stringlist_count()
If fdt_getprop() fails, negative error code should be returned.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-17 20:56:58 +11:00
Maxime Ripard
ae97c77228 tests: overlay: Rename the device tree blobs to be more explicit
Rename the blobs to have a more explicit output that will give us a clearer
idea about whether a DT (and the test) has been compiled using a dtc with
our without overlays support.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-12 10:07:48 +11:00
Maxime Ripard
96162d2bd9 tests: overlay: Add test suffix to the compiled blobs
The compiled blobs in the overlay tests do not have the test suffix which
is usually used to clean up and ignore the test artifacts.

Let's add that suffix.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-11 20:08:38 +11:00
Maxime Ripard
5ce8634733 libfdt: Add fdt_overlay_apply to the exported symbols
fdt_overlay_apply was not usable in the shared library. Export it to allow
its use.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-11 20:08:38 +11:00
Maxime Ripard
804a9db90a fdt: strerr: Remove spurious BADOVERLAY
There's one FDT_ERR_BADOVERLAY too many in the fdt error table.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-11 20:08:38 +11:00
Maxime Ripard
e8c3a1a493 tests: overlay: Move back the bad fixup tests
The bad fixups tests were meant to be usable even for a non-overlay-enabled
dtc.

Move them out of that check.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-07 12:28:58 +11:00
Maxime Ripard
7a72d89d3f libfdt: overlay: Fix symbols and fixups nodes condition
Some base device tree might not have any __symbols__ nodes, since they
might not have any phandle at all.

Similarly, if an overlay doesn't use any base device tree phandles, its
__fixups__ node will be empty.

In such cases, we don't want to stop the phandle parsing, but rather just
ignore the error reported about the missing node.

If it's actually an issue for the overlay we're trying to apply on a given
base device tree, it will be caught later on, but we cannot make the
assumption that early in the application process.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-07 12:28:58 +11:00
Maxime Ripard
cabbaa972c libfdt: overlay: Report a bad overlay for mismatching local fixups
The __local_fixups__ node as a structure that mimics the structure of the
main overlay part.

This means that if we have a child node somewhere in the local fixups
sub-tree and if that node is not present in the main tree, the overlay is
poorly formatted, and we should report it as such.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-07 12:28:58 +11:00
Maxime Ripard
deb0a5c1ae libfdt: Add BADPHANDLE error string
The BADPHANDLE error was missing a string, leading to an <unknown error>
string being returned if you were to call fdt_strerror.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-07 12:28:58 +11:00
David Gibson
7b7a6be9ba libfdt: Don't use 'index' as a local variable name
Using 'index' as a local variable name shadows the standard library index()
function.  This causes warnings on at least some compiler versions.  The
recently added overlay code has a number of instances of this.

This patch replaces 'index' with 'poffset', since 'index' is being used to
mean "offset within a property value" in these cases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 20:45:14 +11:00
Maxime Ripard
aea8860d83 tests: Add tests cases for the overlay code
Add some test infrastructure to test that the overlay can be merged, but
also that poorly formatted fixups would fail as expected.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[dwg: Don't execute bad overlay tests without overlay aware dtc]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 20:20:02 +11:00
Maxime Ripard
0cdd06c513 libfdt: Add overlay application function
The device tree overlays are a good way to deal with user-modifyable
boards or boards with some kind of an expansion mechanism where we can
easily plug new board in (like the BBB, the Raspberry Pi or the CHIP).

Add a new function to merge overlays with a base device tree.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 19:22:41 +11:00
Maxime Ripard
39240cc865 libfdt: Extend the reach of FDT_ERR_BADPHANDLE
So far, the BADPHANDLE error was only used for incorrect phandle values.
Extend that meaning to an improperly formatted phandle property.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 19:22:41 +11:00
Maxime Ripard
4aa3a6f5e6 libfdt: Add new errors for the overlay code
Add a few new error codes to report the failure conditions we might
encounter in the overlay application code:
   - FDT_ERR_BADOVERLAY, when an overlay cannot be parsed, even though its
     structure is correct
   - FDT_ERR_NOPHANDLES, when we ran out of available phandles and we
     cannot use a new phandle without either using an invalid one (-1 or
     0), or one already used.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 19:22:41 +11:00
David Gibson
6d1832c9e6 dtc: Remove "home page" link
The supposed home page hasn't existed for some time.  We don't really have
anything else, so remove the link from the README.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-28 11:29:07 +10:00
Thomas Huth
45fd440a95 Fix some typing errors in libfdt.h and livetree.c
Correct some typos discovered with the codespell utility.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-27 11:32:46 +10:00
David Gibson
a59be4939c DTC 1.4.2
Boring release.  This has a few bugfixes, and most importantly, it
 includes a number of symbols in version.lds which should have been
 exported all along, but were left out previously.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJXyq4AAAoJEGw4ysog2bOSSxkQAKSY9mTfceT5Hvtf7/wkf9IS
 Q1qdmaA8W1zKUPDHlzgIQ44Nz9m2+MVhl3nzlIDsjbAjLZlOfIEaBzmXUDE8MVPv
 wCN+dEcMupN8nTFxeu72/69IXgpKZuNsMRGadiakvH4ja7X2TGmAgLAsAxNndaje
 CPcPPZ50I3WCK/z80b3gc1M1Un/TxvZ++npdTJUidi/+UkokVSR4MDOp95uDPbFl
 rgqUUuUPUx8gI65BX20UFWWj7PE/WIFsPDNRH9jXlHnd3Vs8QC4gxE1N34K64wl2
 BZaUGBOVQisBn8Hx6q1s66T5J1VdMhBvy8vIiZr9CMSEl4cWe3ngxuRXnYWPz0Xz
 /rHUSp+RVu0Zy5YWIr9c5+tJUPlKeb6zaycSNOlYV9WXvD9G2Ho6kVQIUxALMamj
 5Lv4Kq5GwyofQuSOPlNVC/8m9akDMj0NPKWW7O6e1ihFTAq7XudwOBbm2+MdXmSG
 dGHAxSLLCiFBnRbGt64KasAY6AfoHvswK5WCYr1+nAnhz15wksWpGp3qD+KITPzP
 NogJcoqwYSV/YPPuKwThTgnJFw95SLOzfkXpsGSObP40TTisTSnHeHF6Tb3EXSW5
 ajuWXGNFUUonV/p4D2OKdUSYZ0XXEjHXLXDXxMdr6FQ/CcQnbRUMSDRnP7/9F1Y2
 NI1+XT3iOCQMMUBus2QC
 =/ZUB
 -----END PGP SIGNATURE-----

Merge tag 'v1.4.2'

Fix a mistake where the v1.4.2 release tag wasn't actually merged to master.
2016-09-24 11:16:44 +10:00
David Gibson
a34bb721ca dtc: Fix assorted problems in the testcases for the -a option
We just added the -a option to allow padding of the output dtb's size to
a specified alignment.  Unfortunately the test cases for this had several
bugs:
    * Didn't actually test anything since "alignbase" instead of $alignbase
      was passed to the checker function
    * Introduced an unnecessary run_local_test wrapper
    * Didn't provide very helpful output on failure
    * Only attempted to check one alignment value

This patch fixes up these problems.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-22 14:42:42 +10:00
Tim Wang
874f40588d Implement the -a option to pad dtb aligned
There is one condition that need cat the dtb files
into one dtb.img which can support several boards
use same SoC platform.

And the original dtb file size is not aligned to any base.
This may cause "Synchronous Abort" when load from a unligned
address on some SoC machine, such as ARM.

So this patch implement the -a <aligned number> option to
pad zero at the end of dtb files and make the dtb size aligned
to <aligned number>.

Then, the aligned dtbs can cat together and load without "Synchronous
Abort".

Signed-off-by: Tim Wang <timwang@asrmicro.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-22 14:25:50 +10:00
David Gibson
ec02b34c05 dtc: Makefile improvements for release uploading
This has some fixes to the make dist target, and a new make kup target for
maintainer convenience uploading new releases.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-03 21:02:30 +10:00
David Gibson
1ed45d40a1 dtc: Bump version to 1.4.2
Bump version in preparation for a new release.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-09-03 19:34:45 +10:00
Masahiro Yamada
36fd7331fb libfdt: simplify fdt_del_mem_rsv()
The variable "err" is unneeded.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-08-22 06:53:54 -04:00
Maxime Ripard
d877364e4a libfdt: Add fdt_setprop_inplace_namelen_partial
Add a function to modify inplace only a portion of a property..

This is especially useful when the property is an array of values, and you
want to update one of them without changing the DT size.

Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[dwg: Remove unnecessary unsigned qualifier, correct a comment]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-08-01 13:34:39 +10:00
Maxime Ripard
3e9037aaad libfdt: Add fdt_getprop_namelen_w
Add a function to retrieve a writeable property only by the first
characters of its name.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-28 15:29:16 +10:00
Maxime Ripard
84e0e1346c libfdt: Add max phandle retrieval function
Add a function to retrieve the highest phandle in a given device tree.

Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-28 15:29:16 +10:00
Maxime Ripard
d29126c90a libfdt: Add iterator over properties
Implement a macro based on fdt_first_property_offset and
fdt_next_property_offset that provides a convenience to iterate over all
the properties of a given node.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
[dwg: Removed a stray trailing blank line]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-28 15:29:13 +10:00
Thierry Reding
902d0f0953 libfdt: Add a subnodes iterator macro
The fdt_for_each_subnode() iterator macro provided by this patch can be
used to iterate over a device tree node's subnodes. At each iteration a
loop variable will be set to the next subnode.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-28 15:27:57 +10:00
Jean-Christophe Dubois
c539075ba8 fdtput.c: Fix memory leak.
CID 132821 (#1 of 1): Resource leak (RESOURCE_LEAK)
12. leaked_storage: Variable value going out of scope leaks the storage it points to.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-24 01:05:05 +10:00
Jean-Christophe Dubois
f79ddb83e1 fdtget.c: Fix memory leak
CID 132823 (#1 of 1): Resource leak (RESOURCE_LEAK)
5. leaked_storage: Variable blob going out of scope leaks the storage it points to.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-24 01:05:05 +10:00