[libbluray-devel] Check for NULL
hpi1
git at videolan.org
Mon May 29 11:36:48 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon May 29 12:35:23 2017 +0300| [ba396c3b99a9397c75501f35437a91934b695b1c] | committer: hpi1
Check for NULL
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ba396c3b99a9397c75501f35437a91934b695b1c
---
src/libbluray/disc/properties.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libbluray/disc/properties.c b/src/libbluray/disc/properties.c
index 5ccdc054..7490b8d6 100644
--- a/src/libbluray/disc/properties.c
+++ b/src/libbluray/disc/properties.c
@@ -48,6 +48,9 @@ static int _read_prop_file(const char *file, char **data)
if (file_path_exists(file) < 0) {
BD_DEBUG(DBG_FILE, "Properties file %s does not exist\n", file);
*data = str_dup("");
+ if (!*data) {
+ return -1;
+ }
return 0;
}
More information about the libbluray-devel
mailing list