[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Aug 12 21:51:02 UTC 2022


The branch, master has been updated
       via  a38fad29803 s3:utils: Fix NULL check
       via  4a702cddaeb s3:util: Initialize json_object structures so we can call json_free()
      from  78e4aac76df s3: smbd: Remove unix_convert() and associated functions.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a38fad29803f9e2891b2264ac3258394152e8deb
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Aug 10 08:51:06 2022 +0200

    s3:utils: Fix NULL check
    
    CID 1507864
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15140
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Aug 12 21:50:23 UTC 2022 on sn-devel-184

commit 4a702cddaebf7e616706e0c728685567e141b493
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Aug 10 08:41:24 2022 +0200

    s3:util: Initialize json_object structures so we can call json_free()
    
    CID 1507863
    CID 1507865
    CID 1507866
    CID 1507867
    CID 1507868
    CID 1507869
    CID 1507870
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15140
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/utils/status_json.c | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/status_json.c b/source3/utils/status_json.c
index e2798e3e392..79cb1dfe1e4 100644
--- a/source3/utils/status_json.c
+++ b/source3/utils/status_json.c
@@ -189,7 +189,12 @@ int add_profile_item_to_json(struct traverse_state *state,
 			     const char *key,
 			     uintmax_t value)
 {
-	struct json_object section_json, subsection_json;
+	struct json_object section_json = {
+		.valid = false,
+	};
+	struct json_object subsection_json = {
+		.valid = false,
+	};
 	int result = 0;
 
 	section_json = json_get_object(&state->root_json, section);
@@ -796,8 +801,12 @@ static int add_open_to_json(struct json_object *parent_json,
 			    uint32_t lease_type,
 			    const char *uid_str)
 {
-	struct json_object sub_json;
-	struct json_object opens_json;
+	struct json_object sub_json = {
+		.valid = false,
+	};
+	struct json_object opens_json = {
+		.valid = false,
+	};
 	struct timeval_buf tv_buf;
 	int result = 0;
 	char *timestr;
@@ -936,8 +945,12 @@ int print_share_mode_json(struct traverse_state *state,
 			  uint32_t lease_type,
 			  const char *filename)
 {
-	struct json_object locks_json;
-	struct json_object file_json;
+	struct json_object locks_json = {
+		.valid = false,
+	};
+	struct json_object file_json = {
+		.valid = false,
+	};
 	char *key = NULL;
 	int result = 0;
 
@@ -1013,8 +1026,12 @@ static int add_lock_to_json(struct json_object *parent_json,
 			    intmax_t start,
 			    intmax_t size)
 {
-	struct json_object sub_json;
-	struct json_object locks_json;
+	struct json_object sub_json = {
+		.valid = false,
+	};
+	struct json_object locks_json = {
+		.valid = false,
+	};
 	const char *flavour_str;
 	int result = 0;
 
@@ -1198,7 +1215,7 @@ bool print_notify_rec_json(struct traverse_state *state,
 		goto failure;
 	}
 	subdir_filter = talloc_asprintf(tmp_ctx, "%u", instance->subdir_filter);
-	if (filter == NULL) {
+	if (subdir_filter == NULL) {
 		goto failure;
 	}
 	result = json_add_string(&sub_json, "subdir_filter", subdir_filter);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list