Skip to content

Commit

Permalink
fix: maybe double free from static str in Snafu (#5383)
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Weny Xu <[email protected]>
  • Loading branch information
yihong0618 and WenyXu authored Jan 17, 2025
1 parent f8d26b4 commit 52697a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/datasource/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub enum Error {

#[snafu(display("Failed to parse format {} with value: {}", key, value))]
ParseFormat {
key: &'static str,
key: String,
value: String,
#[snafu(implicit)]
location: Location,
Expand Down
6 changes: 3 additions & 3 deletions src/pipeline/src/etl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub enum Error {

#[snafu(display("Processor {processor}: unsupported value {val}"))]
ProcessorUnsupportedValue {
processor: &'static str,
processor: String,
val: String,
#[snafu(implicit)]
location: Location,
Expand Down Expand Up @@ -180,15 +180,15 @@ pub enum Error {

#[snafu(display("Separator '{separator}' must be a single character, but got '{value}'"))]
CsvSeparatorName {
separator: &'static str,
separator: String,
value: String,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Quote '{quote}' must be a single character, but got '{value}'"))]
CsvQuoteName {
quote: &'static str,
quote: String,
value: String,
#[snafu(implicit)]
location: Location,
Expand Down

0 comments on commit 52697a9

Please sign in to comment.