Fossil

Check-in [e45789ee]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added a missing db_finalize() call in /json/branch/list which led to a downstream segfault via an invalid/destructed Stmt handle.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e45789ee8319f9d30dac4a10d4fee5dbaee9bcb0c0ee6e5b0c107dbd2c126416
User & Date: stephan 2018-09-18 17:50:07.256
Context
2018-09-18
19:37
Backout of [115544e97517f447]. Unbreaks the SSL enabled build for MSVC on Windows, due to OpenSSL build system changes that are not accounted for by the check-in. Also, there were crashes with MinGW produced binaries using OpenSSL 1.1.1. ... (check-in: e0cc10f0 user: mistachkin tags: trunk)
17:50
Added a missing db_finalize() call in /json/branch/list which led to a downstream segfault via an invalid/destructed Stmt handle. ... (check-in: e45789ee user: stephan tags: trunk)
15:53
Add the "fossil branch current" command to the 2.7 change log. ... (check-in: fc977f14 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/json_branch.c.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  cson_value * payV;
  cson_object * pay;
  cson_value * listV;
  cson_array * list;
  char const * range = NULL;
  int branchListFlags = BRL_OPEN_ONLY;
  char * sawConversionError = NULL;
  Stmt q;
  if( !g.perm.Read ){
    json_set_err(FSL_JSON_E_DENIED,
                 "Requires 'o' permissions.");
    return NULL;
  }
  payV = cson_value_new_object();
  pay = cson_value_get_object(payV);







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  cson_value * payV;
  cson_object * pay;
  cson_value * listV;
  cson_array * list;
  char const * range = NULL;
  int branchListFlags = BRL_OPEN_ONLY;
  char * sawConversionError = NULL;
  Stmt q = empty_Stmt;
  if( !g.perm.Read ){
    json_set_err(FSL_JSON_E_DENIED,
                 "Requires 'o' permissions.");
    return NULL;
  }
  payV = cson_value_new_object();
  pay = cson_value_get_object(payV);
141
142
143
144
145
146
147

148
149
150
151
152
153
154
                                   __FILE__,__LINE__);
    }
  }
  if( sawConversionError ){
    json_warn(FSL_JSON_W_COL_TO_JSON_FAILED,"%s",sawConversionError);
    free(sawConversionError);
  }

  return payV;
}

/*
** Parameters for the create-branch operation.
*/
typedef struct BranchCreateOptions{







>







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
                                   __FILE__,__LINE__);
    }
  }
  if( sawConversionError ){
    json_warn(FSL_JSON_W_COL_TO_JSON_FAILED,"%s",sawConversionError);
    free(sawConversionError);
  }
  db_finalize(&q);
  return payV;
}

/*
** Parameters for the create-branch operation.
*/
typedef struct BranchCreateOptions{